summaryrefslogtreecommitdiff
path: root/qemu-img.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2010-03-04 10:00:38 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2010-03-09 11:23:00 -0600
commit3e7896dec40ec5b9a51338fa636a58014d6d3f94 (patch)
tree67b9a31c46da28d40d8d393dfb09683df4b3228a /qemu-img.c
parent3829cb460cff65ca8af956db66b697d96076f8e1 (diff)
block: print errno on error
Now that we changed all create calls to return errno, just print it. Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'qemu-img.c')
-rw-r--r--qemu-img.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/qemu-img.c b/qemu-img.c
index 466fdef623..9b28664a30 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -374,7 +374,7 @@ static int img_create(int argc, char **argv)
} else if (ret == -EFBIG) {
error("The image size is too large for file format '%s'", fmt);
} else {
- error("Error while formatting");
+ error("%s: error while creating %s: %s", filename, fmt, strerror(-ret));
}
}
return 0;
@@ -687,7 +687,7 @@ static int img_convert(int argc, char **argv)
} else if (ret == -EFBIG) {
error("The image size is too large for file format '%s'", out_fmt);
} else {
- error("Error while formatting '%s'", out_filename);
+ error("%s: error while converting %s: %s", out_filename, out_fmt, strerror(-ret));
}
}