diff options
author | Markus Armbruster <armbru@redhat.com> | 2010-06-02 18:55:19 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2010-06-15 09:41:59 +0200 |
commit | ac59eb95f386ab99a02f4bba1a24ccbeb52cede8 (patch) | |
tree | 623403b4d865a1f8a4fa220c9cfead4a02ff0452 /blockdev.c | |
parent | 6ab4b5ab8f129df67708be4b58bdf0e13b178548 (diff) |
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>
Diffstat (limited to 'blockdev.c')
-rw-r--r-- | blockdev.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/blockdev.c b/blockdev.c index d74cd1d802..f636bc6916 100644 --- a/blockdev.c +++ b/blockdev.c @@ -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); } } |