[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] qemu-img: fix error messages emitted by img_open()
From: |
Reda Sallahi |
Subject: |
[Qemu-devel] [PATCH] qemu-img: fix error messages emitted by img_open() |
Date: |
Thu, 21 Jul 2016 10:41:53 +0200 |
img_open_file() and img_open_opts() were printing error messages with a
duplicate part because of a wrong use of error_reportf_err() (e.g.
qemu-img: Could not open 'foo': Could not open 'foo': No such file or directory)
This change uses error_report_err() instead to eliminate the duplicate part.
Signed-off-by: Reda Sallahi <address@hidden>
---
qemu-img.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/qemu-img.c b/qemu-img.c
index 2e40e1f..dc6652d 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -268,7 +268,7 @@ static BlockBackend *img_open_opts(const char *optstr,
options = qemu_opts_to_qdict(opts, NULL);
blk = blk_new_open(NULL, NULL, options, flags, &local_err);
if (!blk) {
- error_reportf_err(local_err, "Could not open '%s': ", optstr);
+ error_report_err(local_err);
return NULL;
}
blk_set_enable_write_cache(blk, !writethrough);
@@ -295,7 +295,7 @@ static BlockBackend *img_open_file(const char *filename,
blk = blk_new_open(filename, NULL, options, flags, &local_err);
if (!blk) {
- error_reportf_err(local_err, "Could not open '%s': ", filename);
+ error_report(local_err);
return NULL;
}
blk_set_enable_write_cache(blk, !writethrough);
--
2.9.0
- [Qemu-devel] [PATCH] qemu-img: fix error messages emitted by img_open(),
Reda Sallahi <=