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