summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@hp.com>2009-01-15 11:05:31 -0700
committerAvi Kivity <avi@redhat.com>2009-05-06 10:19:23 +0300
commit1c73a058cc0b0aaf1cdc7192b26cdcd35ff9401c (patch)
treeceff2f98d36c5eb66a8b7e3b2df58fbd955bbc60
parentFix extboot merge (diff)
downloadqemu-kvm-1c73a058cc0b0aaf1cdc7192b26cdcd35ff9401c.tar.gz
qemu-kvm-1c73a058cc0b0aaf1cdc7192b26cdcd35ff9401c.tar.bz2
qemu-kvm-1c73a058cc0b0aaf1cdc7192b26cdcd35ff9401c.zip
virtio-net: Make save/load format independent of build options
We can't rely on build switches to tell us if a save image includes a given field. Signed-off-by: Alex Williamson <alex.williamson@hp.com> Signed-off-by: Avi Kivity <avi@redhat.com>
-rw-r--r--hw/virtio-net.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/virtio-net.c b/hw/virtio-net.c
index ac8e03068..87626c65a 100644
--- a/hw/virtio-net.c
+++ b/hw/virtio-net.c
@@ -616,6 +616,8 @@ static void virtio_net_save(QEMUFile *f, void *opaque)
#ifdef TAP_VNET_HDR
qemu_put_be32(f, tap_has_vnet_hdr(n->vc->vlan->first_client));
+#else
+ qemu_put_be32(f, 0);
#endif
}
@@ -660,6 +662,9 @@ static int virtio_net_load(QEMUFile *f, void *opaque, int version_id)
if (version_id == 7 && qemu_get_be32(f)) {
tap_using_vnet_hdr(n->vc->vlan->first_client, 1);
}
+#else
+ /* FIXME: error out if nonzero? */
+ qemu_get_be32(f);
#endif
if (n->tx_timer_active) {