[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH RFC v3 2/3] vmstate: add VMSTATE_TEST
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PATCH RFC v3 2/3] vmstate: add VMSTATE_TEST |
Date: |
Tue, 25 Mar 2014 00:02:04 +0200 |
Can validate state using VMS_NONE and VMS_MUST_EXIST
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
include/migration/vmstate.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
index de970ab..97629b7 100644
--- a/include/migration/vmstate.h
+++ b/include/migration/vmstate.h
@@ -204,6 +204,12 @@ extern const VMStateInfo vmstate_info_bitmap;
.offset = vmstate_offset_value(_state, _field, _type), \
}
+#define VMSTATE_TEST(_name, _test) { \
+ .name = (_name), \
+ .field_exists = (_test), \
+ .flags = VMS_ARRAY | VMS_MUST_EXIST, \
+}
+
#define VMSTATE_POINTER(_field, _state, _version, _info, _type) { \
.name = (stringify(_field)), \
.version_id = (_version), \
--
MST