aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2013-09-06 16:51:03 +0200
committerKevin Wolf <kwolf@redhat.com>2013-09-12 10:12:48 +0200
commitb70d8c237a0e5e829474c3a12c8783893c4e470e (patch)
tree1ba8e9838b0cab39182aa4bb73c53ac01743a9b2
parentcc84d90ff54c025190dbe49ec5fea1268217c5f2 (diff)
qemu-img create: Emit filename on error
bdrv_img_create generally does not emit the target filename, although this is pretty important information. Therefore, prepend its error message with the output filename (if an error occurs). Signed-off-by: Max Reitz <mreitz@redhat.com>
-rw-r--r--qemu-img.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/qemu-img.c b/qemu-img.c
index ccb0468d94..6a1ba697c5 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -412,7 +412,7 @@ static int img_create(int argc, char **argv)
bdrv_img_create(filename, fmt, base_filename, base_fmt,
options, img_size, BDRV_O_FLAGS, &local_err, quiet);
if (error_is_set(&local_err)) {
- error_report("%s", error_get_pretty(local_err));
+ error_report("%s: %s", filename, error_get_pretty(local_err));
error_free(local_err);
return 1;
}