sim-card
/
qemu
Archived
10
0
Fork 0

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:
Markus Armbruster 2010-06-02 18:55:19 +02:00 committed by Kevin Wolf
parent 6ab4b5ab8f
commit ac59eb95f3
1 changed files with 4 additions and 2 deletions

View File

@ -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);
}
}