aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuiz Capitulino <lcapitulino@redhat.com>2010-02-10 23:49:49 -0200
committerAnthony Liguori <aliguori@us.ibm.com>2010-02-19 15:18:16 -0600
commitd5a7b38f5c9f28c258595f327e28a1b88ffd370f (patch)
treef58afa7b28674c2ba6675b119ead720c511685de
parentef4b7eeec1dee272a590486bca1b53675cf30973 (diff)
Monitor: Convert do_cont() to cmd_new_ret()
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--monitor.c8
-rw-r--r--qemu-monitor.hx2
2 files changed, 7 insertions, 3 deletions
diff --git a/monitor.c b/monitor.c
index c1e0af8cdc..cede36879e 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1148,14 +1148,18 @@ struct bdrv_iterate_context {
/**
* do_cont(): Resume emulation.
*/
-static void do_cont(Monitor *mon, const QDict *qdict, QObject **ret_data)
+static int do_cont(Monitor *mon, const QDict *qdict, QObject **ret_data)
{
struct bdrv_iterate_context context = { mon, 0 };
bdrv_iterate(encrypted_bdrv_it, &context);
/* only resume the vm if all keys are set and valid */
- if (!context.err)
+ if (!context.err) {
vm_start();
+ return 0;
+ } else {
+ return -1;
+ }
}
static void bdrv_key_cb(void *opaque, int err)
diff --git a/qemu-monitor.hx b/qemu-monitor.hx
index 8e51df032d..0eab6db657 100644
--- a/qemu-monitor.hx
+++ b/qemu-monitor.hx
@@ -318,7 +318,7 @@ ETEXI
.params = "",
.help = "resume emulation",
.user_print = monitor_user_noop,
- .mhandler.cmd_new = do_cont,
+ .cmd_new_ret = do_cont,
},
STEXI