mirror of
https://github.com/qemu/qemu.git
synced 2024-11-28 22:33:36 +08:00
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>
This commit is contained in:
parent
ef4b7eeec1
commit
d5a7b38f5c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user