From: Markus Armbruster Date: Wed, 2 Jun 2010 16:55:19 +0000 (+0200) Subject: monitor: Make "commit FOO" complain when FOO doesn't exist X-Git-Tag: v0.13.0-rc0~231 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac59eb95f386ab99a02f4bba1a24ccbeb52cede8;p=thirdparty%2Fqemu.git monitor: Make "commit FOO" complain when FOO doesn't exist Signed-off-by: Markus Armbruster Signed-off-by: Kevin Wolf --- diff --git a/blockdev.c b/blockdev.c index d74cd1d8023..f636bc69164 100644 --- a/blockdev.c +++ b/blockdev.c @@ -493,9 +493,11 @@ void do_commit(Monitor *mon, const QDict *qdict) bdrv_commit_all(); } else { bs = bdrv_find(device); - if (bs) { - bdrv_commit(bs); + if (!bs) { + qerror_report(QERR_DEVICE_NOT_FOUND, device); + return; } + bdrv_commit(bs); } }