aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2010-05-28 20:10:48 +0200
committerKevin Wolf <kwolf@redhat.com>2010-06-04 11:43:39 +0200
commit0923c577f993d61eeaf41f66db1e1010fa113976 (patch)
treea6bc687b0a1efd095eaac66b3e382d6df11c34fa
parent1573a35d99fe60f98d30f50e9187040586c2b801 (diff)
qemu-io: Fix error messages
The truncate and getlength commands passed a negative error number to strerror. They also happen to be the two functions that are lacking a newline at the end of their error message. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r--qemu-io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/qemu-io.c b/qemu-io.c
index 72a45247da..7c6120b6ac 100644
--- a/qemu-io.c
+++ b/qemu-io.c
@@ -1317,7 +1317,7 @@ truncate_f(int argc, char **argv)
ret = bdrv_truncate(bs, offset);
if (ret < 0) {
- printf("truncate: %s", strerror(ret));
+ printf("truncate: %s\n", strerror(-ret));
return 0;
}
@@ -1342,7 +1342,7 @@ length_f(int argc, char **argv)
size = bdrv_getlength(bs);
if (size < 0) {
- printf("getlength: %s", strerror(size));
+ printf("getlength: %s\n", strerror(-size));
return 0;
}