monitor: Make "commit FOO" complain when FOO doesn't exist
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
6ab4b5ab8f
commit
ac59eb95f3
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user