From patchwork Wed Mar 3 12:07:00 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 46799 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 33722B7CC1 for ; Wed, 3 Mar 2010 23:34:58 +1100 (EST) Received: from localhost ([127.0.0.1]:36940 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NmnjR-00060R-EP for incoming@patchwork.ozlabs.org; Wed, 03 Mar 2010 07:31:17 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NmnMI-0000rk-K6 for qemu-devel@nongnu.org; Wed, 03 Mar 2010 07:07:22 -0500 Received: from [199.232.76.173] (port=53687 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NmnMI-0000rS-2e for qemu-devel@nongnu.org; Wed, 03 Mar 2010 07:07:22 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NmnMG-0005Jq-VA for qemu-devel@nongnu.org; Wed, 03 Mar 2010 07:07:21 -0500 Received: from mx1.redhat.com ([209.132.183.28]:16753) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NmnMG-0005Jk-HX for qemu-devel@nongnu.org; Wed, 03 Mar 2010 07:07:20 -0500 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o23C7JAB000388 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 3 Mar 2010 07:07:19 -0500 Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o23C71AE004209; Wed, 3 Mar 2010 07:07:18 -0500 From: Juan Quintela To: qemu-devel@nongnu.org Date: Wed, 3 Mar 2010 13:07:00 +0100 Message-Id: <92764ba73c7a75e8747b7a5a58a4a1ccb3d51489.1267617582.git.quintela@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: kwolf@redhat.com, amit.shah@redhat.com Subject: [Qemu-devel] [PATCH 10/10] block: print errno on error 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 Now that we changed all create calls to return errno, just print it. Signed-off-by: Juan Quintela --- qemu-img.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 0c9f2d4..f6c40fb 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -374,7 +374,7 @@ static int img_create(int argc, char **argv) } else if (ret == -EFBIG) { error("The image size is too large for file format '%s'", fmt); } else { - error("Error while formatting"); + error("Error (%s) while formatting for file format '%s'", strerror(ret), fmt); } } return 0; @@ -687,7 +687,7 @@ static int img_convert(int argc, char **argv) } else if (ret == -EFBIG) { error("The image size is too large for file format '%s'", out_fmt); } else { - error("Error while formatting '%s'", out_filename); + error("Error (%s) while formatting file '%s'", strerror(ret), out_filename); } }