monitor: Port handler_1 to use QDict
This commit ports command handlers that receive one argument to use
the new monitor's dictionary.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
diff --git a/savevm.c b/savevm.c
index 99fad79..8216593 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1480,7 +1480,7 @@
return ret;
}
-void do_savevm(Monitor *mon, const char *name)
+void do_savevm(Monitor *mon, const QDict *qdict)
{
DriveInfo *dinfo;
BlockDriverState *bs, *bs1;
@@ -1494,6 +1494,7 @@
#else
struct timeval tv;
#endif
+ const char *name = qdict_get_try_str(qdict, "name");
bs = get_bs_snapshots();
if (!bs) {
@@ -1644,11 +1645,12 @@
return 0;
}
-void do_delvm(Monitor *mon, const char *name)
+void do_delvm(Monitor *mon, const QDict *qdict)
{
DriveInfo *dinfo;
BlockDriverState *bs, *bs1;
int ret;
+ const char *name = qdict_get_str(qdict, "name");
bs = get_bs_snapshots();
if (!bs) {