From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=53299 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PPWGU-0004Uw-SR for qemu-devel@nongnu.org; Mon, 06 Dec 2010 03:17:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PPWGT-0006eS-SC for qemu-devel@nongnu.org; Mon, 06 Dec 2010 03:17:42 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45441) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PPWGT-0006eA-Gh for qemu-devel@nongnu.org; Mon, 06 Dec 2010 03:17:41 -0500 From: Jes.Sorensen@redhat.com Date: Mon, 6 Dec 2010 09:17:33 +0100 Message-Id: <1291623456-3826-1-git-send-email-Jes.Sorensen@redhat.com> Subject: [Qemu-devel] [PATCH v2 0/3] Cleanup qemu-img code List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: kwolf@redhat.com Cc: stefanha@linux.vnet.ibm.com, qemu-devel@nongnu.org From: Jes Sorensen Hi, These patches moves the handling of block help printing to shared code, which allows the "?" detection to happen early in the parsing, instead of half way down img_create() and img_convert(). I would like to see this happen as I would like to pull some of the code out of img_create() and into block.c so it can be shared with qemu and qemu-img. The formatting patch is solely because the third patch wanted to change code next to the badly formatted code, and I didn't want to pollute the patch with the formatting fixed. The third patch fixes qemu-img to exit on detection of unknown options instead of continuing with a potentially wrong set of arguments. New in v2: Add missing free_option_parameters() and handle the help() case in the general switch() statements for the getopt() output. Cheers, Jes Jes Sorensen (3): Consolidate printing of block driver options Fix formatting and missing braces in qemu-img.c Fail if detecting an unknown option qemu-img.c | 132 ++++++++++++++++++++++++++++++++++++++++++++---------------- 1 files changed, 97 insertions(+), 35 deletions(-) -- 1.7.3.2