Monitor: Convert do_eject() 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:
Luiz Capitulino 2010-02-10 23:49:50 -02:00 committed by Anthony Liguori
parent d5a7b38f5c
commit 9b9d4d9c79
2 changed files with 4 additions and 4 deletions

View File

@ -989,7 +989,7 @@ static int eject_device(Monitor *mon, BlockDriverState *bs, int force)
return 0;
}
static void do_eject(Monitor *mon, const QDict *qdict, QObject **ret_data)
static int do_eject(Monitor *mon, const QDict *qdict, QObject **ret_data)
{
BlockDriverState *bs;
int force = qdict_get_int(qdict, "force");
@ -998,9 +998,9 @@ static void do_eject(Monitor *mon, const QDict *qdict, QObject **ret_data)
bs = bdrv_find(filename);
if (!bs) {
qemu_error_new(QERR_DEVICE_NOT_FOUND, filename);
return;
return -1;
}
eject_device(mon, bs, force);
return eject_device(mon, bs, force);
}
static void do_block_set_passwd(Monitor *mon, const QDict *qdict,

View File

@ -138,7 +138,7 @@ ETEXI
.params = "[-f] device",
.help = "eject a removable medium (use -f to force it)",
.user_print = monitor_user_noop,
.mhandler.cmd_new = do_eject,
.cmd_new_ret = do_eject,
},
STEXI