From patchwork Fri May 28 18:15:04 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: qemu-io: Fix error messages X-Patchwork-Submitter: Kevin Wolf X-Patchwork-Id: 53954 Message-Id: <1275070504-8690-1-git-send-email-kwolf@redhat.com> To: qemu-devel@nongnu.org Cc: kwolf@redhat.com Date: Fri, 28 May 2010 20:15:04 +0200 From: Kevin Wolf List-Id: qemu-devel.nongnu.org 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 Reviewed-by: Christoph Hellwig --- qemu-io.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu-io.c b/qemu-io.c index 72a4524..7c6120b 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; }