From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=39061 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OI45e-0004So-4l for qemu-devel@nongnu.org; Fri, 28 May 2010 14:15:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OI45b-0005D3-Pq for qemu-devel@nongnu.org; Fri, 28 May 2010 14:15:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1175) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OI45b-0005Cl-JW for qemu-devel@nongnu.org; Fri, 28 May 2010 14:15:23 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4SIFM9N011107 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 28 May 2010 14:15:22 -0400 From: Kevin Wolf Date: Fri, 28 May 2010 20:15:04 +0200 Message-Id: <1275070504-8690-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH] qemu-io: Fix error messages List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com 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 --- 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; } -- 1.6.6.1