aboutsummaryrefslogtreecommitdiff
path: root/savevm.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2010-11-01 15:51:54 +0100
committermalc <av1474@comtv.ru>2010-11-01 17:57:12 +0300
commitcdae5cfbd3a61a5d4de79b829fb41188073d3002 (patch)
tree554c9a8e2aa3e604d3ee4ead482af82b6f048e1e /savevm.c
parent12b6278f9e2a1e3b8f60223fe065ddf2b119c6bc (diff)
add VMSTATE_BOOL
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
Diffstat (limited to 'savevm.c')
-rw-r--r--savevm.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/savevm.c b/savevm.c
index 2d8cadc2c2..4e49765816 100644
--- a/savevm.c
+++ b/savevm.c
@@ -675,6 +675,27 @@ uint64_t qemu_get_be64(QEMUFile *f)
return v;
}
+/* bool */
+
+static int get_bool(QEMUFile *f, void *pv, size_t size)
+{
+ bool *v = pv;
+ *v = qemu_get_byte(f);
+ return 0;
+}
+
+static void put_bool(QEMUFile *f, void *pv, size_t size)
+{
+ bool *v = pv;
+ qemu_put_byte(f, *v);
+}
+
+const VMStateInfo vmstate_info_bool = {
+ .name = "bool",
+ .get = get_bool,
+ .put = put_bool,
+};
+
/* 8 bit int */
static int get_int8(QEMUFile *f, void *pv, size_t size)