aboutsummaryrefslogtreecommitdiff
path: root/hw/fdc.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2009-11-12 00:39:12 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2009-11-12 11:23:56 -0600
commit2966b390d0f7cd5e5b971290fcc20685de374228 (patch)
tree61636a1b3cca5aeccfc5b8f4a9ac8a771db8e535 /hw/fdc.c
parent6b1325029d80455b9da7cd7bd84a88cb915b867c (diff)
fdc: fix vmstate variable passed
When code was transformed to use qdev_reset/vmstate registration, vmstate was passed a variable of the wrong type Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/fdc.c')
-rw-r--r--hw/fdc.c33
1 files changed, 29 insertions, 4 deletions
diff --git a/hw/fdc.c b/hw/fdc.c
index d2bfa71d8f..e875291a3a 100644
--- a/hw/fdc.c
+++ b/hw/fdc.c
@@ -661,7 +661,7 @@ static int fdc_post_load(void *opaque, int version_id)
}
static const VMStateDescription vmstate_fdc = {
- .name = "fdc",
+ .name = "fdctrl",
.version_id = 2,
.minimum_version_id = 2,
.minimum_version_id_old = 2,
@@ -699,6 +699,31 @@ static const VMStateDescription vmstate_fdc = {
}
};
+static const VMStateDescription vmstate_fdc_isa = {
+ .name = "fdc",
+ .version_id = 2,
+ .minimum_version_id = 2,
+ .minimum_version_id_old = 2,
+ .fields = (VMStateField []) {
+ /* Controller State */
+ VMSTATE_STRUCT(state, fdctrl_isabus_t, 0, vmstate_fdc, fdctrl_t),
+ VMSTATE_END_OF_LIST()
+ }
+};
+
+static const VMStateDescription vmstate_fdc_sysbus = {
+ .name = "fdc",
+ .version_id = 2,
+ .minimum_version_id = 2,
+ .minimum_version_id_old = 2,
+ .fields = (VMStateField []) {
+ /* Controller State */
+ VMSTATE_STRUCT(state, fdctrl_sysbus_t, 0, vmstate_fdc, fdctrl_t),
+ VMSTATE_END_OF_LIST()
+ }
+};
+
+
static void fdctrl_external_reset_sysbus(DeviceState *d)
{
fdctrl_sysbus_t *sys = container_of(d, fdctrl_sysbus_t, busdev.qdev);
@@ -1998,7 +2023,7 @@ static ISADeviceInfo isa_fdc_info = {
.qdev.name = "isa-fdc",
.qdev.size = sizeof(fdctrl_isabus_t),
.qdev.no_user = 1,
- .qdev.vmsd = &vmstate_fdc,
+ .qdev.vmsd = &vmstate_fdc_isa,
.qdev.reset = fdctrl_external_reset_isa,
.qdev.props = (Property[]) {
DEFINE_PROP_DRIVE("driveA", fdctrl_isabus_t, state.drives[0].dinfo),
@@ -2011,7 +2036,7 @@ static SysBusDeviceInfo sysbus_fdc_info = {
.init = sysbus_fdc_init1,
.qdev.name = "sysbus-fdc",
.qdev.size = sizeof(fdctrl_sysbus_t),
- .qdev.vmsd = &vmstate_fdc,
+ .qdev.vmsd = &vmstate_fdc_sysbus,
.qdev.reset = fdctrl_external_reset_sysbus,
.qdev.props = (Property[]) {
DEFINE_PROP_DRIVE("driveA", fdctrl_sysbus_t, state.drives[0].dinfo),
@@ -2024,7 +2049,7 @@ static SysBusDeviceInfo sun4m_fdc_info = {
.init = sun4m_fdc_init1,
.qdev.name = "SUNW,fdtwo",
.qdev.size = sizeof(fdctrl_sysbus_t),
- .qdev.vmsd = &vmstate_fdc,
+ .qdev.vmsd = &vmstate_fdc_sysbus,
.qdev.reset = fdctrl_external_reset_sysbus,
.qdev.props = (Property[]) {
DEFINE_PROP_DRIVE("drive", fdctrl_sysbus_t, state.drives[0].dinfo),