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