[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 3/7] blockdev: Use error_report() in hmp_commit()
From: |
Kevin Wolf |
Subject: |
[PULL 3/7] blockdev: Use error_report() in hmp_commit() |
Date: |
Fri, 25 Oct 2019 15:46:07 +0200 |
Instead of using monitor_printf() to report errors, hmp_commit() should
use error_report() like other places do.
Signed-off-by: Kevin Wolf <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
---
blockdev.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index 03c7cd7651..ba491e3ef5 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -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));
}
}
--
2.20.1
- [PULL 0/7] Block layer patches, Kevin Wolf, 2019/10/25
- [PULL 2/7] iotests: Skip read-only cases in 118 when run as root, Kevin Wolf, 2019/10/25
- [PULL 4/7] block/backup: drop dead code from backup_job_create, Kevin Wolf, 2019/10/25
- [PULL 5/7] doc: Describe missing generic -blockdev options, Kevin Wolf, 2019/10/25
- [PULL 1/7] qapi: add support for blkreplay driver, Kevin Wolf, 2019/10/25
- [PULL 7/7] qcow2: Fix corruption bug in qcow2_detect_metadata_preallocation(), Kevin Wolf, 2019/10/25
- [PULL 3/7] blockdev: Use error_report() in hmp_commit(),
Kevin Wolf <=
- [PULL 6/7] coroutine: Add qemu_co_mutex_assert_locked(), Kevin Wolf, 2019/10/25
- Re: [PULL 0/7] Block layer patches, Peter Maydell, 2019/10/25