From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M4bgS-0006dc-KE for qemu-devel@nongnu.org; Thu, 14 May 2009 10:13:16 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M4bgM-0006av-8m for qemu-devel@nongnu.org; Thu, 14 May 2009 10:13:14 -0400 Received: from [199.232.76.173] (port=36079 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M4bgL-0006ac-Iu for qemu-devel@nongnu.org; Thu, 14 May 2009 10:13:09 -0400 Received: from mx2.redhat.com ([66.187.237.31]:33373) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M4bgK-0002ET-32 for qemu-devel@nongnu.org; Thu, 14 May 2009 10:13:08 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n4EED6ai003033 for ; Thu, 14 May 2009 10:13:06 -0400 From: Kevin Wolf Date: Thu, 14 May 2009 16:12:01 +0200 Message-Id: <1242310324-6688-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [RFC][PATCH 0/3] Make qemu-img create options generic List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf Currently, qemu-img and the bdrv_create() interface need to carry parameters for every single option that is used by at least one file format. We already have a few of such format specific options (encryption for qcow2, version 6 header for VMDK, backing file for some formats) and there are more to come (like qcow cluster size). This patch series changes this into a more generic approach: All block drivers contain a data structure which describes all options this driver recognizes. qemu-img can use this structure then instead of hard-coding every single option. An -o option is introduced for these parameteres, the format is the usual comma separated name=value style as in -drive. This series is not yet meant to be applied. qemu-img convert still needs to be converted to the new interface and it's not exactly tested extensively (let alone the state after patch 1 or 2 applied without the rest). Maybe it also could use some better identifiers, I'm open for suggestions. Kevin Wolf (3): Create qemu-option.h Convert all block drivers Convert qemu-img create Makefile | 2 +- block-cow.c | 24 ++++- block-qcow.c | 28 +++++- block-qcow2.c | 36 ++++++- block-raw-posix.c | 37 +++++-- block-raw-win32.c | 20 +++- block-vmdk.c | 28 +++++- block-vpc.c | 21 +++- block-vvfat.c | 4 +- block.c | 44 ++++++-- block.h | 6 +- block_int.h | 17 ++- qemu-img.c | 133 +++++++++++++++++--------- qemu-option.c | 280 +++++++++++++++++++++++++++++++++++++++++++++++++++++ qemu-option.h | 61 ++++++++++++ sysemu.h | 2 - vl.c | 38 +------- 17 files changed, 642 insertions(+), 139 deletions(-) create mode 100644 qemu-option.c create mode 100644 qemu-option.h