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 | 813cd38fb0c9557eab084cdbc0d21c666c70861c (patch) | |
tree | 623403b4d865a1f8a4fa220c9cfead4a02ff0452 /blockdev.c | |
parent | 9c6e48d43fa87faaa844e52bdd9dde3625f158b7 (diff) | |
download | qemu-813cd38fb0c9557eab084cdbc0d21c666c70861c.tar.gz qemu-813cd38fb0c9557eab084cdbc0d21c666c70861c.tar.bz2 qemu-813cd38fb0c9557eab084cdbc0d21c666c70861c.zip |
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); } } |