summary refs log tree commit diff stats
path: root/include/migration/qjson.h
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-05-24 12:21:07 +0100
committerPeter Maydell <peter.maydell@linaro.org>2016-05-24 12:21:07 +0100
commit99694362ee563c5bbfad92bcc6bd578c0d4f7ce7 (patch)
treebf6e256235405492bab498e558fe34118abba429 /include/migration/qjson.h
parentb0f6ef8915247f3230ffd9b71af9c3dadb6082c7 (diff)
parentfe904ea8242cbae2d7e69c052c754b8f5f1ba1d6 (diff)
downloadfocaccia-qemu-99694362ee563c5bbfad92bcc6bd578c0d4f7ce7.tar.gz
focaccia-qemu-99694362ee563c5bbfad92bcc6bd578c0d4f7ce7.zip
Merge remote-tracking branch 'remotes/amit-migration/tags/migration-2.7-1' into staging
migration fixes:

- ensure src block devices continue fine after a failed migration
- fail on migration blockers; helps 9p savevm/loadvm
- move autoconverge commands out of experimental state
- move the migration-specific qjson in migration/

# gpg: Signature made Mon 23 May 2016 18:15:09 BST using RSA key ID 657EF670
# gpg: Good signature from "Amit Shah <amit@amitshah.net>"
# gpg:                 aka "Amit Shah <amit@kernel.org>"
# gpg:                 aka "Amit Shah <amitshah@gmx.net>"

* remotes/amit-migration/tags/migration-2.7-1:
  migration: regain control of images when migration fails to complete
  savevm: fail if migration blockers are present
  migration: Promote improved autoconverge commands out of experimental state
  migration/qjson: Drop gratuitous use of QOM
  migration: Move qjson.[ch] to migration/

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/migration/qjson.h')
-rw-r--r--include/migration/qjson.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/include/migration/qjson.h b/include/migration/qjson.h
new file mode 100644
index 0000000000..2978b5f371
--- /dev/null
+++ b/include/migration/qjson.h
@@ -0,0 +1,29 @@
+/*
+ * QEMU JSON writer
+ *
+ * Copyright Alexander Graf
+ *
+ * Authors:
+ *  Alexander Graf <agraf@suse.de>
+ *
+ * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
+ * See the COPYING.LIB file in the top-level directory.
+ *
+ */
+#ifndef QEMU_QJSON_H
+#define QEMU_QJSON_H
+
+typedef struct QJSON QJSON;
+
+QJSON *qjson_new(void);
+void qjson_destroy(QJSON *json);
+void json_prop_str(QJSON *json, const char *name, const char *str);
+void json_prop_int(QJSON *json, const char *name, int64_t val);
+void json_end_array(QJSON *json);
+void json_start_array(QJSON *json, const char *name);
+void json_end_object(QJSON *json);
+void json_start_object(QJSON *json, const char *name);
+const char *qjson_get_str(QJSON *json);
+void qjson_finish(QJSON *json);
+
+#endif /* QEMU_QJSON_H */