vmstate: Avoid seeking
authorJan Kiszka <jan.kiszka@web.de>
Wed, 2 Dec 2009 11:36:35 +0000 (12:36 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Thu, 3 Dec 2009 16:04:53 +0000 (10:04 -0600)
commit083a449b7dc2295fd57d765eac292cf72827dc41
tree9a9c59436a56407f2c9139bf4cb6c2bdeebb97ef
parent20cf2ca710ce381bd0abb4f02b51b9461cba320e
vmstate: Avoid seeking

Seeking on vmstate save/load does not work if the underlying file is a
stream. We could try to make all QEMUFile* forward-seek-aware, but first
attempts in this direction indicated that it's saner to convert the few
qemu_fseek-on-vmstates users to plain reads/writes.

This fixes various subtle vmstate corruptions where unused fields were
involved.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
savevm.c