提交 d5a7b38f 编写于 作者: L Luiz Capitulino 提交者: Anthony Liguori

Monitor: Convert do_cont() to cmd_new_ret()

Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 ef4b7eee
......@@ -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)
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册