Commit ac59eb95 authored by Markus Armbruster's avatar Markus Armbruster Committed by Kevin Wolf

monitor: Make "commit FOO" complain when FOO doesn't exist

Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
parent 6ab4b5ab
......@@ -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);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment