* [Qemu-devel] [PATCH] qemu-img: Omit error_report() after img_open()
@ 2014-11-03 12:40 Max Reitz
2014-11-03 13:32 ` Kevin Wolf
2014-11-03 13:58 ` Markus Armbruster
0 siblings, 2 replies; 3+ messages in thread
From: Max Reitz @ 2014-11-03 12:40 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, Peter Lieven, Stefan Hajnoczi, Max Reitz
img_open() already prints an error if the operation failed, so there
should not be another error_report() afterwards.
Signed-off-by: Max Reitz <mreitz@redhat.com>
---
qemu-img.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/qemu-img.c b/qemu-img.c
index 66a7eb4..a42335c 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -1126,7 +1126,6 @@ static int img_compare(int argc, char **argv)
blk1 = img_open("image_1", filename1, fmt1, flags, true, quiet);
if (!blk1) {
- error_report("Can't open file %s", filename1);
ret = 2;
goto out3;
}
@@ -1134,7 +1133,6 @@ static int img_compare(int argc, char **argv)
blk2 = img_open("image_2", filename2, fmt2, flags, true, quiet);
if (!blk2) {
- error_report("Can't open file %s", filename2);
ret = 2;
goto out2;
}
@@ -1482,7 +1480,6 @@ static int img_convert(int argc, char **argv)
true, quiet);
g_free(id);
if (!blk[bs_i]) {
- error_report("Could not open '%s'", argv[optind + bs_i]);
ret = -1;
goto out;
}
@@ -2962,7 +2959,6 @@ static int img_amend(int argc, char **argv)
blk = img_open("image", filename, fmt, flags, true, quiet);
if (!blk) {
- error_report("Could not open image '%s'", filename);
ret = -1;
goto out;
}
--
1.9.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu-img: Omit error_report() after img_open()
2014-11-03 12:40 [Qemu-devel] [PATCH] qemu-img: Omit error_report() after img_open() Max Reitz
@ 2014-11-03 13:32 ` Kevin Wolf
2014-11-03 13:58 ` Markus Armbruster
1 sibling, 0 replies; 3+ messages in thread
From: Kevin Wolf @ 2014-11-03 13:32 UTC (permalink / raw)
To: Max Reitz; +Cc: Peter Lieven, qemu-devel, Stefan Hajnoczi
Am 03.11.2014 um 13:40 hat Max Reitz geschrieben:
> img_open() already prints an error if the operation failed, so there
> should not be another error_report() afterwards.
>
> Signed-off-by: Max Reitz <mreitz@redhat.com>
Thanks, applied to the block branch.
Kevin
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu-img: Omit error_report() after img_open()
2014-11-03 12:40 [Qemu-devel] [PATCH] qemu-img: Omit error_report() after img_open() Max Reitz
2014-11-03 13:32 ` Kevin Wolf
@ 2014-11-03 13:58 ` Markus Armbruster
1 sibling, 0 replies; 3+ messages in thread
From: Markus Armbruster @ 2014-11-03 13:58 UTC (permalink / raw)
To: Max Reitz; +Cc: Kevin Wolf, Peter Lieven, qemu-devel, Stefan Hajnoczi
Max Reitz <mreitz@redhat.com> writes:
> img_open() already prints an error if the operation failed, so there
> should not be another error_report() afterwards.
>
> Signed-off-by: Max Reitz <mreitz@redhat.com>
Especially not when only 4 out of 12 callers do it.
Reviewed-by: Markus Armbruster <armbru@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-11-03 13:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-03 12:40 [Qemu-devel] [PATCH] qemu-img: Omit error_report() after img_open() Max Reitz
2014-11-03 13:32 ` Kevin Wolf
2014-11-03 13:58 ` Markus Armbruster
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).