]> Git Repo - qemu.git/commitdiff
Monitor: Convert do_cont() to cmd_new_ret()
authorLuiz Capitulino <[email protected]>
Thu, 11 Feb 2010 01:49:49 +0000 (23:49 -0200)
committerAnthony Liguori <[email protected]>
Fri, 19 Feb 2010 21:18:16 +0000 (15:18 -0600)
Signed-off-by: Luiz Capitulino <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
monitor.c
qemu-monitor.hx

index c1e0af8cdc96160b2b23f700241a34acada8d1c8..cede36879e1bf876f6be954dea7dd4ebe43183cc 100644 (file)
--- 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)
index 8e51df032db7088a124aa2d03cda8c809fff73d3..0eab6db657ad05b8e3d577966f993b1eade21c6f 100644 (file)
@@ -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
This page took 0.038326 seconds and 4 git commands to generate.