From patchwork Fri Jun 4 16:32:53 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Wolf X-Patchwork-Id: 54652 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 86F6FB7D1F for ; Sat, 5 Jun 2010 03:29:22 +1000 (EST) Received: from localhost ([127.0.0.1]:42077 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OKahq-0006nT-SX for incoming@patchwork.ozlabs.org; Fri, 04 Jun 2010 13:29:18 -0400 Received: from [140.186.70.92] (port=45116 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OKZtg-000802-CK for qemu-devel@nongnu.org; Fri, 04 Jun 2010 12:37:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OKZta-0002jA-6h for qemu-devel@nongnu.org; Fri, 04 Jun 2010 12:37:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58012) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OKZtZ-0002ir-Ss for qemu-devel@nongnu.org; Fri, 04 Jun 2010 12:37:22 -0400 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o54GbIuD026701 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 4 Jun 2010 12:37:20 -0400 Received: from localhost.localdomain (vpn2-9-144.ams2.redhat.com [10.36.9.144]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o54GXWSm032074; Fri, 4 Jun 2010 12:34:48 -0400 From: Kevin Wolf To: anthony@codemonkey.ws Date: Fri, 4 Jun 2010 18:32:53 +0200 Message-Id: <1275669195-28312-6-git-send-email-kwolf@redhat.com> In-Reply-To: <1275669195-28312-1-git-send-email-kwolf@redhat.com> References: <1275669195-28312-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: kwolf@redhat.com, qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH 05/27] 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 --- 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; }