From 9b9d4d9c79ee7072629f36ea123a28a89ada8845 Mon Sep 17 00:00:00 2001 From: Luiz Capitulino Date: Wed, 10 Feb 2010 23:49:50 -0200 Subject: Monitor: Convert do_eject() to cmd_new_ret() Signed-off-by: Luiz Capitulino Signed-off-by: Anthony Liguori --- monitor.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'monitor.c') diff --git a/monitor.c b/monitor.c index cede36879e..e960c3831b 100644 --- a/monitor.c +++ b/monitor.c @@ -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, -- cgit v1.2.3