|
|
9ae3a8 |
From bb21b453413a2f98069fef482761982d1e90234a Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Max Reitz <mreitz@redhat.com>
|
|
|
9ae3a8 |
Date: Mon, 4 Nov 2013 22:32:13 +0100
|
|
|
9ae3a8 |
Subject: [PATCH 20/87] qemu-img create: Emit filename on error
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
RH-Author: Max Reitz <mreitz@redhat.com>
|
|
|
9ae3a8 |
Message-id: <1383604354-12743-23-git-send-email-mreitz@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 55322
|
|
|
9ae3a8 |
O-Subject: [RHEL-7.0 qemu-kvm PATCH 22/43] qemu-img create: Emit filename on error
|
|
|
9ae3a8 |
Bugzilla: 1026524
|
|
|
9ae3a8 |
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Fam Zheng <famz@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
BZ: 1026524
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
bdrv_img_create generally does not emit the target filename, although
|
|
|
9ae3a8 |
this is pretty important information. Therefore, prepend its error
|
|
|
9ae3a8 |
message with the output filename (if an error occurs).
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Max Reitz <mreitz@redhat.com>
|
|
|
9ae3a8 |
(cherry picked from commit b70d8c237a0e5e829474c3a12c8783893c4e470e)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Max Reitz <mreitz@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
qemu-img.c | 2 +-
|
|
|
9ae3a8 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
qemu-img.c | 2 +-
|
|
|
9ae3a8 |
1 files changed, 1 insertions(+), 1 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/qemu-img.c b/qemu-img.c
|
|
|
9ae3a8 |
index 9fda8cf..0f869f3 100644
|
|
|
9ae3a8 |
--- a/qemu-img.c
|
|
|
9ae3a8 |
+++ b/qemu-img.c
|
|
|
9ae3a8 |
@@ -409,7 +409,7 @@ static int img_create(int argc, char **argv)
|
|
|
9ae3a8 |
bdrv_img_create(filename, fmt, base_filename, base_fmt,
|
|
|
9ae3a8 |
options, img_size, BDRV_O_FLAGS, &local_err, quiet);
|
|
|
9ae3a8 |
if (error_is_set(&local_err)) {
|
|
|
9ae3a8 |
- error_report("%s", error_get_pretty(local_err));
|
|
|
9ae3a8 |
+ error_report("%s: %s", filename, error_get_pretty(local_err));
|
|
|
9ae3a8 |
error_free(local_err);
|
|
|
9ae3a8 |
return 1;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.7.1
|
|
|
9ae3a8 |
|