Blame SOURCES/kvm-qemu-img-Use-strerror-for-generic-resize-error.patch

5d360b
From 42138bf0821350fa4ebad59775fb1c73f514478b Mon Sep 17 00:00:00 2001
5d360b
From: Max Reitz <mreitz@redhat.com>
5d360b
Date: Mon, 27 Nov 2017 18:09:27 +0100
5d360b
Subject: [PATCH 8/9] qemu-img: Use strerror() for generic resize error
5d360b
5d360b
RH-Author: Max Reitz <mreitz@redhat.com>
5d360b
Message-id: <20171127180928.10364-2-mreitz@redhat.com>
5d360b
Patchwork-id: 77917
5d360b
O-Subject: [RHEL-7.5 qemu-kvm PATCH 1/2] qemu-img: Use strerror() for generic resize error
5d360b
Bugzilla: 1459725
5d360b
RH-Acked-by: John Snow <jsnow@redhat.com>
5d360b
RH-Acked-by: Fam Zheng <famz@redhat.com>
5d360b
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
5d360b
5d360b
Emitting the plain error number is not very helpful. Use strerror()
5d360b
instead.
5d360b
5d360b
Signed-off-by: Max Reitz <mreitz@redhat.com>
5d360b
Message-id: 20160615153630.2116-2-mreitz@redhat.com
5d360b
Reviewed-by: Eric Blake <eblake@redhat.com>
5d360b
Signed-off-by: Max Reitz <mreitz@redhat.com>
5d360b
(cherry picked from commit bcf23482ae00e040dbef46c44ff914bf788a0937)
5d360b
Signed-off-by: Max Reitz <mreitz@redhat.com>
5d360b
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
5d360b
---
5d360b
 qemu-img.c | 2 +-
5d360b
 1 file changed, 1 insertion(+), 1 deletion(-)
5d360b
5d360b
diff --git a/qemu-img.c b/qemu-img.c
5d360b
index eb2d4cb..efbe16d 100644
5d360b
--- a/qemu-img.c
5d360b
+++ b/qemu-img.c
5d360b
@@ -2645,7 +2645,7 @@ static int img_resize(int argc, char **argv)
5d360b
         error_report("Image is read-only");
5d360b
         break;
5d360b
     default:
5d360b
-        error_report("Error resizing image (%d)", -ret);
5d360b
+        error_report("Error resizing image: %s", strerror(-ret));
5d360b
         break;
5d360b
     }
5d360b
 out:
5d360b
-- 
5d360b
1.8.3.1
5d360b