From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=38827 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQgNQ-0007Go-7E for qemu-devel@nongnu.org; Thu, 09 Dec 2010 08:17:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PQgNP-0008Ev-1v for qemu-devel@nongnu.org; Thu, 09 Dec 2010 08:17:40 -0500 Received: from mx1.redhat.com ([209.132.183.28]:5539) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PQgNO-0008Eo-Qu for qemu-devel@nongnu.org; Thu, 09 Dec 2010 08:17:39 -0500 From: Jes.Sorensen@redhat.com Date: Thu, 9 Dec 2010 14:17:23 +0100 Message-Id: <1291900645-10661-1-git-send-email-Jes.Sorensen@redhat.com> Subject: [Qemu-devel] [PATCH v5 0/2] Clean up img_create() and introduce strtosz_suffix() List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: kwolf@redhat.com Cc: qemu-devel@nongnu.org, armbru@redhat.com, stefanha@linux.vnet.ibm.com From: Jes Sorensen This patch set introduces strtosz_suffix() which is needed to be able to use strtosz parsing with a non MB default suffix. This is used to clean up qemu-img.c:img_create(). Kevin asked me to rebase this instead of applying the other patches on top, so please discard the previous versions. Sorry for the patch noise. v5 fixes the two issues pointed out by Stefan, making the call in strtosz() explicitly use STRTOSZ_DEFSUFFIX_MB instead of 0 to specify the default and adds a named argument to the prototype for strtosz_suffix(). Jes Sorensen (2): Introduce strtosz_suffix() qemu-img.c: Clean up handling of image size in img_create() cutils.c | 17 ++++++++++++++--- qemu-common.h | 7 +++++++ qemu-img.c | 23 +++++++++++++++++------ 3 files changed, 38 insertions(+), 9 deletions(-) -- 1.7.3.2