From patchwork Thu Dec 9 11:54:05 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jes Sorensen X-Patchwork-Id: 74924 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 AD977B70AF for ; Fri, 10 Dec 2010 03:11:13 +1100 (EST) Received: from localhost ([127.0.0.1]:49697 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQj4x-00061T-Um for incoming@patchwork.ozlabs.org; Thu, 09 Dec 2010 11:10:48 -0500 Received: from [140.186.70.92] (port=38493 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQf4p-00085e-4v for qemu-devel@nongnu.org; Thu, 09 Dec 2010 06:54:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PQf4o-0001Wp-5u for qemu-devel@nongnu.org; Thu, 09 Dec 2010 06:54:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:20580) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PQf4n-0001Wf-UW for qemu-devel@nongnu.org; Thu, 09 Dec 2010 06:54:22 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oB9BsAF8022077 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 9 Dec 2010 06:54:10 -0500 Received: from red-feather.redhat.com (ovpn-113-53.phx2.redhat.com [10.3.113.53]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oB9Bs5rr029605; Thu, 9 Dec 2010 06:54:09 -0500 From: Jes.Sorensen@redhat.com To: kwolf@redhat.com Date: Thu, 9 Dec 2010 12:54:05 +0100 Message-Id: <1291895645-32363-3-git-send-email-Jes.Sorensen@redhat.com> In-Reply-To: <1291895645-32363-1-git-send-email-Jes.Sorensen@redhat.com> References: <1291895645-32363-1-git-send-email-Jes.Sorensen@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: qemu-devel@nongnu.org, armbru@redhat.com, stefanha@linux.vnet.ibm.com Subject: [Qemu-devel] [PATCH 2/2] Make img_create() use strtosz_suffix() 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 From: Jes Sorensen This reestablished the old default of using bytes as the default for the size argument, and not MB as we do in pretty much every other place. Signed-off-by: Jes Sorensen --- qemu-img.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 9a5e7e1..603bdb3 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -331,7 +331,7 @@ static int img_create(int argc, char **argv) /* Get image size, if specified */ if (optind < argc) { ssize_t sval; - sval = strtosz(argv[optind++], NULL); + sval = strtosz_suffix(argv[optind++], NULL, STRTOSZ_DEFSUFFIX_B); if (sval < 0) { error("Invalid image size specified! You may use k, M, G or " "T suffixes for ");