]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
vmstate: Add VMSTATE_BUFFER_UNSAFE
authorJuan Quintela <quintela@redhat.com>
Tue, 20 Oct 2009 15:56:13 +0000 (17:56 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Tue, 27 Oct 2009 17:28:57 +0000 (12:28 -0500)
Just sent <anything> as a buffer.  We put the pointer and the size
code does the rest.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/hw.h

diff --git a/hw/hw.h b/hw/hw.h
index 0509ee969864c77dbdf33de6b103470b1448429a..eb5c639250d0e7b740f5beee7ade1e3bb014556d 100644 (file)
--- a/hw/hw.h
+++ b/hw/hw.h
@@ -485,6 +485,15 @@ extern const VMStateInfo vmstate_info_unused_buffer;
     .offset       = vmstate_offset_buffer(_state, _field) + _start,  \
 }
 
+#define VMSTATE_BUFFER_UNSAFE(_field, _state, _version, _size) {     \
+    .name       = (stringify(_field)),                               \
+    .version_id = (_version),                                        \
+    .size       = (_size),                                           \
+    .info       = &vmstate_info_buffer,                              \
+    .flags      = VMS_BUFFER,                                        \
+    .offset     = offsetof(_state, _field),                          \
+}
+
 #define VMSTATE_UNUSED_BUFFER(_test, _version, _size) {              \
     .name         = "unused",                                        \
     .field_exists = (_test),                                         \