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

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

parent 6ab4b5ab
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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);
    }
}