diff options
author | Juan Quintela <quintela@redhat.com> | 2009-10-19 15:46:28 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-10-27 12:28:51 -0500 |
commit | 76507c754831bc6c01cc010255b992c7c9b57742 (patch) | |
tree | 7387e4d540e9a7ff1ee0c0aae82d6e3e141be4b9 /savevm.c | |
parent | d4829d49920e123ce016a087571070268d6e8b2a (diff) |
vmstate: Add VMSTATE_BUFFER_UNUSED
It allows to have 'things' in savevm format not backed in the device state
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'savevm.c')
-rw-r--r-- | savevm.c | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -944,6 +944,26 @@ const VMStateInfo vmstate_info_buffer = { .put = put_buffer, }; +/* unused buffers: space that was used for some fields that are + not usefull anymore */ + +static int get_unused_buffer(QEMUFile *f, void *pv, size_t size) +{ + qemu_fseek(f, size, SEEK_CUR); + return 0; +} + +static void put_unused_buffer(QEMUFile *f, void *pv, size_t size) +{ + qemu_fseek(f, size, SEEK_CUR); +} + +const VMStateInfo vmstate_info_unused_buffer = { + .name = "unused_buffer", + .get = get_unused_buffer, + .put = put_unused_buffer, +}; + typedef struct SaveStateEntry { QTAILQ_ENTRY(SaveStateEntry) entry; char idstr[256]; |