Index: new/qapi-schema.json
===================================================================
---- new.orig/qapi-schema.json 2012-09-21 11:10:23.000000000 +0200
-+++ new/qapi-schema.json 2012-09-21 12:58:47.000000000 +0200
+--- new.orig/qapi-schema.json 2012-09-24 06:12:15.000000000 +0200
++++ new/qapi-schema.json 2012-09-24 06:14:10.000000000 +0200
@@ -358,6 +358,40 @@
'*total-time': 'int'} }
{ 'command': 'query-target', 'returns': 'TargetInfo' }
+
+
-+{ 'command': 'snapshot-start' 'data': { '*statefile': 'str' } }
++{ 'command': 'savevm-start' 'data': { '*statefile': 'str' } }
+
+{ 'command': 'snapshot-drive', 'data': { 'device': 'str', 'name': 'str' } }
+
+{ 'command': 'delete-drive-snapshot', 'data': { 'device': 'str', 'name': 'str' } }
+
-+{ 'command': 'snapshot-end' }
++{ 'command': 'savevm-end' }
Index: new/qmp-commands.hx
===================================================================
---- new.orig/qmp-commands.hx 2012-09-21 11:10:23.000000000 +0200
-+++ new/qmp-commands.hx 2012-09-21 11:11:22.000000000 +0200
+--- new.orig/qmp-commands.hx 2012-09-24 06:12:15.000000000 +0200
++++ new/qmp-commands.hx 2012-09-24 06:15:13.000000000 +0200
@@ -2514,3 +2514,27 @@
.args_type = "",
.mhandler.cmd_new = qmp_marshal_input_query_target,
},
+
+ {
-+ .name = "snapshot-start",
++ .name = "savevm-start",
+ .args_type = "statefile:s?",
-+ .mhandler.cmd_new = qmp_marshal_input_snapshot_start,
++ .mhandler.cmd_new = qmp_marshal_input_savevm_start,
+ },
+
+ {
+ },
+
+ {
-+ .name = "snapshot-end",
++ .name = "savevm-end",
+ .args_type = "",
-+ .mhandler.cmd_new = qmp_marshal_input_snapshot_end,
++ .mhandler.cmd_new = qmp_marshal_input_savevm_end,
+ },
Index: new/hmp.c
===================================================================
---- new.orig/hmp.c 2012-09-21 11:10:23.000000000 +0200
-+++ new/hmp.c 2012-09-21 12:59:44.000000000 +0200
+--- new.orig/hmp.c 2012-09-24 06:12:15.000000000 +0200
++++ new/hmp.c 2012-09-24 06:21:35.000000000 +0200
@@ -1102,3 +1102,60 @@
qmp_closefd(fdname, &errp);
hmp_handle_error(mon, &errp);
}
+
-+void hmp_snapshot_start(Monitor *mon, const QDict *qdict)
++void hmp_savevm_start(Monitor *mon, const QDict *qdict)
+{
+ Error *errp = NULL;
+ const char *statefile = qdict_get_try_str(qdict, "statefile");
+
-+ qmp_snapshot_start(statefile != NULL, statefile, &errp);
++ qmp_savevm_start(statefile != NULL, statefile, &errp);
+ hmp_handle_error(mon, &errp);
+}
+
+ hmp_handle_error(mon, &errp);
+}
+
-+void hmp_snapshot_end(Monitor *mon, const QDict *qdict)
++void hmp_savevm_end(Monitor *mon, const QDict *qdict)
+{
+ Error *errp = NULL;
+
-+ qmp_snapshot_end(&errp);
++ qmp_savevm_end(&errp);
+ hmp_handle_error(mon, &errp);
+}
+
+}
Index: new/hmp.h
===================================================================
---- new.orig/hmp.h 2012-09-21 11:10:23.000000000 +0200
-+++ new/hmp.h 2012-09-21 12:35:32.000000000 +0200
+--- new.orig/hmp.h 2012-09-24 06:12:15.000000000 +0200
++++ new/hmp.h 2012-09-24 06:23:00.000000000 +0200
@@ -25,6 +25,7 @@
void hmp_info_uuid(Monitor *mon);
void hmp_info_chardev(Monitor *mon);
void hmp_netdev_del(Monitor *mon, const QDict *qdict);
void hmp_getfd(Monitor *mon, const QDict *qdict);
void hmp_closefd(Monitor *mon, const QDict *qdict);
-+void hmp_snapshot_start(Monitor *mon, const QDict *qdict);
++void hmp_savevm_start(Monitor *mon, const QDict *qdict);
+void hmp_snapshot_drive(Monitor *mon, const QDict *qdict);
+void hmp_delete_drive_snapshot(Monitor *mon, const QDict *qdict);
-+void hmp_snapshot_end(Monitor *mon, const QDict *qdict);
++void hmp_savevm_end(Monitor *mon, const QDict *qdict);
#endif
Index: new/hmp-commands.hx
===================================================================
---- new.orig/hmp-commands.hx 2012-09-21 11:10:23.000000000 +0200
-+++ new/hmp-commands.hx 2012-09-21 12:30:35.000000000 +0200
+--- new.orig/hmp-commands.hx 2012-09-24 06:12:15.000000000 +0200
++++ new/hmp-commands.hx 2012-09-24 06:16:14.000000000 +0200
@@ -1468,6 +1468,8 @@
show current migration capabilities
@item info migrate_cache_size
ETEXI
+
+ {
-+ .name = "snapshot-start",
++ .name = "savevm-start",
+ .args_type = "statefile:s?",
+ .params = "[statefile]",
+ .help = "Prepare for snapshot and halt VM. Save VM state to statefile.",
-+ .mhandler.cmd = hmp_snapshot_start,
++ .mhandler.cmd = hmp_savevm_start,
+ },
+
+ {
+ },
+
+ {
-+ .name = "snapshot-end",
++ .name = "savevm-end",
+ .args_type = "",
+ .params = "",
+ .help = "Resume VM after snaphot.",
-+ .mhandler.cmd = hmp_snapshot_end,
++ .mhandler.cmd = hmp_savevm_end,
+ },
Index: new/savevm-async.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ new/savevm-async.c 2012-09-21 13:42:14.000000000 +0200
++++ new/savevm-async.c 2012-09-24 06:19:58.000000000 +0200
@@ -0,0 +1,441 @@
+#include "qemu-common.h"
+#include "qerror.h"
+ /* do nothing here - should not be called */
+}
+
-+void qmp_snapshot_start(bool has_statefile, const char *statefile, Error **errp)
++void qmp_savevm_start(bool has_statefile, const char *statefile, Error **errp)
+{
+ BlockDriver *drv = NULL;
+ int bdrv_oflags = BDRV_O_CACHE_WB | BDRV_O_RDWR;
+ }
+}
+
-+void qmp_snapshot_end(Error **errp)
++void qmp_savevm_end(Error **errp)
+{
+ if (snap_state.state == SAVE_STATE_DONE) {
+ error_set(errp, ERROR_CLASS_GENERIC_ERROR,
+}
Index: new/Makefile.objs
===================================================================
---- new.orig/Makefile.objs 2012-09-21 11:10:23.000000000 +0200
-+++ new/Makefile.objs 2012-09-21 11:11:22.000000000 +0200
+--- new.orig/Makefile.objs 2012-09-24 06:12:15.000000000 +0200
++++ new/Makefile.objs 2012-09-24 06:12:21.000000000 +0200
@@ -78,6 +78,7 @@
common-obj-y += pflib.o
common-obj-y += bitmap.o bitops.o
common-obj-$(CONFIG_WIN32) += version.o
Index: new/sysemu.h
===================================================================
---- new.orig/sysemu.h 2012-09-21 13:30:06.000000000 +0200
-+++ new/sysemu.h 2012-09-21 13:30:36.000000000 +0200
+--- new.orig/sysemu.h 2012-09-24 06:12:15.000000000 +0200
++++ new/sysemu.h 2012-09-24 06:12:21.000000000 +0200
@@ -72,6 +72,7 @@
void do_savevm(Monitor *mon, const QDict *qdict);
Index: new/qemu-options.hx
===================================================================
---- new.orig/qemu-options.hx 2012-09-21 13:31:18.000000000 +0200
-+++ new/qemu-options.hx 2012-09-21 13:32:02.000000000 +0200
+--- new.orig/qemu-options.hx 2012-09-24 06:12:21.000000000 +0200
++++ new/qemu-options.hx 2012-09-24 06:12:21.000000000 +0200
@@ -2477,6 +2477,19 @@
Start right away with a saved state (@code{loadvm} in monitor)
ETEXI
"-daemonize daemonize QEMU after initializing\n", QEMU_ARCH_ALL)
Index: new/vl.c
===================================================================
---- new.orig/vl.c 2012-09-21 13:32:39.000000000 +0200
-+++ new/vl.c 2012-09-21 13:34:30.000000000 +0200
+--- new.orig/vl.c 2012-09-24 06:12:21.000000000 +0200
++++ new/vl.c 2012-09-24 06:12:21.000000000 +0200
@@ -2364,6 +2364,7 @@
int optind;
const char *optarg;