mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
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
1 changed files with 4 additions and 2 deletions
|
@ -493,9 +493,11 @@ void do_commit(Monitor *mon, const QDict *qdict)
|
||||||
bdrv_commit_all();
|
bdrv_commit_all();
|
||||||
} else {
|
} else {
|
||||||
bs = bdrv_find(device);
|
bs = bdrv_find(device);
|
||||||
if (bs) {
|
if (!bs) {
|
||||||
bdrv_commit(bs);
|
qerror_report(QERR_DEVICE_NOT_FOUND, device);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
bdrv_commit(bs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue