From patchwork Fri May 28 18:15:04 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Wolf X-Patchwork-Id: 53954 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 19383B7D16 for ; Sat, 29 May 2010 04:45:01 +1000 (EST) Received: from localhost ([127.0.0.1]:40206 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OI4YE-0001vn-E0 for incoming@patchwork.ozlabs.org; Fri, 28 May 2010 14:44:58 -0400 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 Received: from localhost.localdomain (vpn1-4-101.ams2.redhat.com [10.36.4.101]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4SIFK0x010334; Fri, 28 May 2010 14:15:21 -0400 From: Kevin Wolf To: qemu-devel@nongnu.org Date: Fri, 28 May 2010 20:15:04 +0200 Message-Id: <1275070504-8690-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: kwolf@redhat.com Subject: [Qemu-devel] [PATCH] qemu-io: Fix error messages X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@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; }