Message ID | 1384320296-22812-1-git-send-email-akong@redhat.com |
---|---|
State | New |
Headers | show |
Am 13.11.2013 um 06:24 hat Amos Kong geschrieben: > Currently the output error is always: > strerror(-4) -> Unknown error -4 > > This patch moves ret assignment after reporting original error. > > Signed-off-by: Amos Kong <akong@redhat.com> Fam and Amos, can you consolidate the fixes in one patch, and update the test case in the same patch as well? Kevin
diff --git a/qemu-img.c b/qemu-img.c index 926f0a0..1fd664f 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -1045,9 +1045,9 @@ static int img_compare(int argc, char **argv) } if (ret) { if (ret < 0) { - ret = 4; error_report("Error while reading offset %" PRId64 ": %s", sectors_to_bytes(sector_num), strerror(-ret)); + ret = 4; } goto out; }
Currently the output error is always: strerror(-4) -> Unknown error -4 This patch moves ret assignment after reporting original error. Signed-off-by: Amos Kong <akong@redhat.com> --- qemu-img.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)