diff options
author | Kevin Wolf <kwolf@redhat.com> | 2019-05-27 18:01:41 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2019-10-25 15:15:01 +0200 |
commit | 46741111baab169482916d120d8949676ad16a77 (patch) | |
tree | 7063d9219c75525955293f55a7db5fc2c7ebe66e | |
parent | d926f4ddd284d8d9566937e4deff65f8284db09f (diff) | |
download | qemu-46741111baab169482916d120d8949676ad16a77.zip qemu-46741111baab169482916d120d8949676ad16a77.tar.gz qemu-46741111baab169482916d120d8949676ad16a77.tar.bz2 |
blockdev: Use error_report() in hmp_commit()
Instead of using monitor_printf() to report errors, hmp_commit() should
use error_report() like other places do.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
-rw-r--r-- | blockdev.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -1088,11 +1088,11 @@ void hmp_commit(Monitor *mon, const QDict *qdict) blk = blk_by_name(device); if (!blk) { - monitor_printf(mon, "Device '%s' not found\n", device); + error_report("Device '%s' not found", device); return; } if (!blk_is_available(blk)) { - monitor_printf(mon, "Device '%s' has no medium\n", device); + error_report("Device '%s' has no medium", device); return; } @@ -1105,8 +1105,7 @@ void hmp_commit(Monitor *mon, const QDict *qdict) aio_context_release(aio_context); } if (ret < 0) { - monitor_printf(mon, "'commit' error for '%s': %s\n", device, - strerror(-ret)); + error_report("'commit' error for '%s': %s", device, strerror(-ret)); } } |