diff options
author | Juan Quintela <quintela@redhat.com> | 2009-10-07 17:24:31 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-10-27 12:28:44 -0500 |
commit | 6521dc629c97637af7e734f6975a6f8746e4cd84 (patch) | |
tree | 5729594f368808f40191dbe05719e0d25e04c2b2 /hw/ide/core.c | |
parent | 73c595e1d51b9aa66c551e416eee0c835955c4b9 (diff) | |
download | qemu-6521dc629c97637af7e734f6975a6f8746e4cd84.zip qemu-6521dc629c97637af7e734f6975a6f8746e4cd84.tar.gz qemu-6521dc629c97637af7e734f6975a6f8746e4cd84.tar.bz2 |
ide: port idebus to vmstate
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/ide/core.c')
-rw-r--r-- | hw/ide/core.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/hw/ide/core.c b/hw/ide/core.c index 0b6de6c..e1433b2 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -2654,16 +2654,26 @@ void ide_load(QEMUFile* f, IDEState *s, int version_id) /* XXX: if a transfer is pending, we do not save it yet */ } +const VMStateDescription vmstate_ide_bus = { + .name = "ide_bus", + .version_id = 1, + .minimum_version_id = 1, + .minimum_version_id_old = 1, + .fields = (VMStateField []) { + VMSTATE_UINT8(cmd, IDEBus), + VMSTATE_UINT8(unit, IDEBus), + VMSTATE_END_OF_LIST() + } +}; + void idebus_save(QEMUFile* f, IDEBus *bus) { - qemu_put_8s(f, &bus->cmd); - qemu_put_8s(f, &bus->unit); + vmstate_save_state(f, &vmstate_ide_bus, bus); } void idebus_load(QEMUFile* f, IDEBus *bus, int version_id) { - qemu_get_8s(f, &bus->cmd); - qemu_get_8s(f, &bus->unit); + vmstate_load_state(f, &vmstate_ide_bus, bus, vmstate_ide_bus.version_id); } /***********************************************************/ |