[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 04/49] vmstate: remove ps2_kbd_load_old()
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PATCH 04/49] vmstate: remove ps2_kbd_load_old() |
Date: |
Tue, 29 Sep 2009 22:48:23 +0200 |
Now that we have version_id on post_load() we don't need the old load
function
Signed-off-by: Juan Quintela <address@hidden>
---
hw/ps2.c | 16 ++++------------
1 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/hw/ps2.c b/hw/ps2.c
index fff4d13..0644e01 100644
--- a/hw/ps2.c
+++ b/hw/ps2.c
@@ -541,19 +541,11 @@ static const VMStateDescription vmstate_ps2_common = {
}
};
-static int ps2_kbd_load_old(QEMUFile* f, void* opaque, int version_id)
+static int ps2_kbd_post_load(void* opaque, int version_id)
{
PS2KbdState *s = (PS2KbdState*)opaque;
- if (version_id != 2 && version_id != 3)
- return -EINVAL;
-
- vmstate_load_state(f, &vmstate_ps2_common, &s->common, version_id);
- s->scan_enabled=qemu_get_be32(f);
- s->translate=qemu_get_be32(f);
- if (version_id == 3)
- s->scancode_set=qemu_get_be32(f);
- else
+ if (version_id == 2)
s->scancode_set=2;
return 0;
}
@@ -561,9 +553,9 @@ static int ps2_kbd_load_old(QEMUFile* f, void* opaque, int
version_id)
static const VMStateDescription vmstate_ps2_keyboard = {
.name = "ps2kbd",
.version_id = 3,
- .minimum_version_id = 3,
+ .minimum_version_id = 2,
.minimum_version_id_old = 2,
- .load_state_old = ps2_kbd_load_old,
+ .post_load = ps2_kbd_post_load,
.fields = (VMStateField []) {
VMSTATE_STRUCT(common, PS2KbdState, 0, vmstate_ps2_common, PS2State),
VMSTATE_INT32(scan_enabled, PS2KbdState),
--
1.6.2.5
- [Qemu-devel] [PATCH 00/49] VMState: Fix design faults, i2c port, x86 cpu port, ..., Juan Quintela, 2009/09/29
- [Qemu-devel] [PATCH 01/49] vmstate: remove const for put operations, Juan Quintela, 2009/09/29
- [Qemu-devel] [PATCH 02/49] vmstate: add version_id argument to post_load, Juan Quintela, 2009/09/29
- [Qemu-devel] [PATCH 03/49] vmstate: remove const from pre_save() functions, Juan Quintela, 2009/09/29
- [Qemu-devel] [PATCH 04/49] vmstate: remove ps2_kbd_load_old(),
Juan Quintela <=
- [Qemu-devel] [PATCH 05/49] vmstate: Add support for sending partial arrays, Juan Quintela, 2009/09/29
- [Qemu-devel] [PATCH 06/49] qdev: Add support for uint8_t, Juan Quintela, 2009/09/29
- [Qemu-devel] [PATCH 07/49] i2c: addresses are load/save as uint8_t values, change types to reflect this, Juan Quintela, 2009/09/29
- [Qemu-devel] [PATCH 11/49] vmstate: create VMSTATE_I2C_SLAVE, Juan Quintela, 2009/09/29
- [Qemu-devel] [PATCH 08/49] vmstate: port i2c_bus device, Juan Quintela, 2009/09/29
- [Qemu-devel] [PATCH 10/49] vmstate: add uint8 array, Juan Quintela, 2009/09/29
- [Qemu-devel] [PATCH 12/49] vmstate: port wm8750 device, Juan Quintela, 2009/09/29
- [Qemu-devel] [PATCH 09/49] vmstate: port i2c_slave device, Juan Quintela, 2009/09/29
- [Qemu-devel] [PATCH 14/49] vmstate: create VMSTATE_STRUCT_POINTER, Juan Quintela, 2009/09/29
- [Qemu-devel] [PATCH 13/49] vmstate: port max7310 device, Juan Quintela, 2009/09/29