[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 17/17] qemu-img: Report error even with --oformat=jso
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 17/17] qemu-img: Report error even with --oformat=json |
Date: |
Mon, 2 Jun 2014 15:56:48 +0200 |
From: Max Reitz <address@hidden>
img_check() should report that the format of the given image does not
support checks even if JSON output is desired. JSON data is output to
stdout, as opposed to error messages, which are (in the case of
qemu-img) printed to stderr. Therefore, it is easy to distinguish
between the two.
Also, img_info() does already use error_report() for human-readable
messages even though JSON output is desired (through
collect_image_info_list()).
Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
qemu-img.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/qemu-img.c b/qemu-img.c
index d118da5..b3d2bc6 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -663,9 +663,7 @@ static int img_check(int argc, char **argv)
ret = collect_image_check(bs, check, filename, fmt, fix);
if (ret == -ENOTSUP) {
- if (output_format == OFORMAT_HUMAN) {
- error_report("This image format does not support checks");
- }
+ error_report("This image format does not support checks");
ret = 63;
goto fail;
}
--
1.8.3.1
- [Qemu-devel] [PULL 08/17] blockdev: Plug memory leak in blockdev_init(), (continued)
- [Qemu-devel] [PULL 08/17] blockdev: Plug memory leak in blockdev_init(), Kevin Wolf, 2014/06/02
- [Qemu-devel] [PULL 07/17] qemu-io: Don't print NULL when open without non-option arg fails, Kevin Wolf, 2014/06/02
- [Qemu-devel] [PULL 10/17] block/qapi: Plug memory leak in dump_qobject() case QTYPE_QERROR, Kevin Wolf, 2014/06/02
- [Qemu-devel] [PULL 11/17] block/vvfat: Plug memory leak in check_directory_consistency(), Kevin Wolf, 2014/06/02
- [Qemu-devel] [PULL 09/17] blockdev: Plug memory leak in drive_init(), Kevin Wolf, 2014/06/02
- [Qemu-devel] [PULL 12/17] block/vvfat: Plug memory leak in read_directory(), Kevin Wolf, 2014/06/02
- [Qemu-devel] [PULL 13/17] block/sheepdog: Plug memory leak in sd_snapshot_create(), Kevin Wolf, 2014/06/02
- [Qemu-devel] [PULL 14/17] qemu-img: Plug memory leak in convert command, Kevin Wolf, 2014/06/02
- [Qemu-devel] [PULL 15/17] block/raw-posix.c: Avoid nonstandard LONG_LONG_MAX, Kevin Wolf, 2014/06/02
- [Qemu-devel] [PULL 16/17] vmdk: Fix local_err in vmdk_create, Kevin Wolf, 2014/06/02
- [Qemu-devel] [PULL 17/17] qemu-img: Report error even with --oformat=json,
Kevin Wolf <=
- Re: [Qemu-devel] [PULL 00/17] Block patches, Peter Maydell, 2014/06/02