commit | ac59eb95f386ab99a02f4bba1a24ccbeb52cede8 | [log] [tgz] |
---|---|---|
author | Markus Armbruster <armbru@redhat.com> | Wed Jun 02 18:55:19 2010 +0200 |
committer | Kevin Wolf <kwolf@redhat.com> | Tue Jun 15 09:41:59 2010 +0200 |
tree | 623403b4d865a1f8a4fa220c9cfead4a02ff0452 | |
parent | 6ab4b5ab8f129df67708be4b58bdf0e13b178548 [diff] [blame] |
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>
diff --git a/blockdev.c b/blockdev.c index d74cd1d..f636bc6 100644 --- a/blockdev.c +++ b/blockdev.c
@@ -493,9 +493,11 @@ 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); } }