[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 02/25] serial: use post_load version_id field and re
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PATCH 02/25] serial: use post_load version_id field and remove pre_load function |
Date: |
Mon, 19 Oct 2009 20:42:47 +0200 |
Signed-off-by: Juan Quintela <address@hidden>
---
hw/serial.c | 11 +++--------
1 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/hw/serial.c b/hw/serial.c
index eb14f11..ea4154f 100644
--- a/hw/serial.c
+++ b/hw/serial.c
@@ -648,17 +648,13 @@ static void serial_pre_save(void *opaque)
s->fcr_vmstate = s->fcr;
}
-static int serial_pre_load(void *opaque)
-{
- SerialState *s = opaque;
- s->fcr_vmstate = 0;
- return 0;
-}
-
static int serial_post_load(void *opaque, int version_id)
{
SerialState *s = opaque;
+ if (version_id < 3) {
+ s->fcr_vmstate = 0;
+ }
/* Initialize fcr via setter to perform essential side-effects */
serial_ioport_write(s, 0x02, s->fcr_vmstate);
return 0;
@@ -669,7 +665,6 @@ static const VMStateDescription vmstate_serial = {
.version_id = 3,
.minimum_version_id = 2,
.pre_save = serial_pre_save,
- .pre_load = serial_pre_load,
.post_load = serial_post_load,
.fields = (VMStateField []) {
VMSTATE_UINT16_V(divider, SerialState, 2),
--
1.6.2.5
- [Qemu-devel] [PATCH 00/25] VMState cleanups and conversion of network drivers, Juan Quintela, 2009/10/19
- [Qemu-devel] [PATCH 01/25] vmstate: Add support for partial buffers transmission, Juan Quintela, 2009/10/19
- [Qemu-devel] [PATCH 03/25] vnmstate: fix name for uint8_equal, Juan Quintela, 2009/10/19
- [Qemu-devel] [PATCH 02/25] serial: use post_load version_id field and remove pre_load function,
Juan Quintela <=
- [Qemu-devel] [PATCH 04/25] vmstate: add VMSTATE_UINT16_EQUAL[_V], Juan Quintela, 2009/10/19
- [Qemu-devel] [PATCH 05/25] vmstate: Rename VMS_VARRAY to VMS_VARRAY_INT32, Juan Quintela, 2009/10/19
- [Qemu-devel] [PATCH 06/25] vmstate: fix indentation, Juan Quintela, 2009/10/19
- [Qemu-devel] [PATCH 07/25] vmstate: factor vmstate_offset_value, Juan Quintela, 2009/10/19
- [Qemu-devel] [PATCH 08/25] vmstate: factor vmstate_offset_pointer, Juan Quintela, 2009/10/19
- [Qemu-devel] [PATCH 09/25] vmstate: factor vmstate_offset_array, Juan Quintela, 2009/10/19
- [Qemu-devel] [PATCH 10/25] vmstate: factor vmstate_offset_buffer, Juan Quintela, 2009/10/19
- [Qemu-devel] [PATCH 11/25] vmstate: factor VMSTATE_*BUFFER* definitions, Juan Quintela, 2009/10/19
- [Qemu-devel] [PATCH 12/25] vmstate: Unfold VMSTATE_INT32_VARRAY() only use and remove it, Juan Quintela, 2009/10/19
- [Qemu-devel] [PATCH 13/25] vmstate: add VMS_VARRAY_UINT16_UNSAFE (varrays with uint16 indexes), Juan Quintela, 2009/10/19