From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52126) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTqpS-0006oL-6G for qemu-devel@nongnu.org; Thu, 01 Nov 2012 05:12:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TTqpQ-0000Uw-Tz for qemu-devel@nongnu.org; Thu, 01 Nov 2012 05:12:46 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:46990) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTqpQ-0000Uq-OB for qemu-devel@nongnu.org; Thu, 01 Nov 2012 05:12:44 -0400 Received: by mail-pb0-f45.google.com with SMTP id rp2so1555663pbb.4 for ; Thu, 01 Nov 2012 02:12:43 -0700 (PDT) Sender: Dong Xu Wang From: Dong Xu Wang Date: Thu, 1 Nov 2012 17:12:20 +0800 Message-Id: <1351761150-20705-1-git-send-email-wdongxu@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH V5 00/10] replace QEMUOptionParameter with QemuOpts parser List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, Dong Xu Wang Patch 1-3 are from Luiz, added Markus's comments, discussion could be found here: http://lists.nongnu.org/archive/html/qemu-devel/2012-07/msg02716.html Patch 3 was changed according Paolo's comments. Patch 4-5: because qemu_opts_create can not fail while id is null, so create function qemu_opts_create_nofail and use it. Patch 6: create function qemu_opt_set_number, like qemu_opt_set_bool. Patch 7: add def_value and use it in qemu_opts_print. Patch 8: Create functions to pair with QEMUOptionParameter parser. Patch 9: Use QemuOpts parser in Block. Patch 10: Remove QEMUOptionParameter parser related code. v4->v5: 1) Rewrite qemu_opts_create_nofail function based on Peter Maydell's comments. 2) Use g_strdup_printf in qemu_opt_set_number. 3) Rewrite qemu_opts_print. 4) .bdrv_create_options returns pointer directly. Fix a bug about "encryption". 5) Check qemu_opt_get_number in raw-posix.c. v3->v4: 1) Rebased to the newest source tree. 2) Remove redundant "#include "block-cache.h" 3) Other small changes. v2->v3: 1) rewrite qemu_opt_set_bool and qemu_opt_set_number according Paolo's coments. 2) split patches to make review easier. v1->v2: 1) add Luiz's patches. 2) create qemu_opt_set_number() and qemu_opts_create_nofail() functions. 3) add QemuOptsList map to drivers. 4) use original opts parser, not creating new ones. 5) fix other bugs. Luiz Capitulino (2): qemu-option: opt_set(): split it up into more functions qemu-option: qemu_opts_validate(): fix duplicated code Dong Xu Wang (8): qemu-option: qemu_opt_set_bool(): fix code duplication introduce qemu_opts_create_nofail function use qemu_opts_create_nofail create new function: qemu_opt_set_number add def_value and use it in qemu_opts_print. Create four opts list related functions Use QemuOpts support in block layer remove QEMUOptionParameter related functions and struct block.c | 91 +++++----- block.h | 8 +- block/cow.c | 46 +++--- block/qcow.c | 60 +++---- block/qcow2.c | 171 +++++++++--------- block/qed.c | 86 +++++----- block/raw-posix.c | 65 +++---- block/raw.c | 22 ++- block/sheepdog.c | 75 ++++---- block/vdi.c | 68 ++++---- block/vmdk.c | 74 ++++---- block/vpc.c | 51 +++--- block/vvfat.c | 11 +- block_int.h | 6 +- blockdev.c | 2 +- hw/watchdog.c | 2 +- qemu-config.c | 4 +- qemu-img.c | 63 +++---- qemu-option.c | 512 ++++++++++++++++++----------------------------------- qemu-option.h | 39 +---- qemu-sockets.c | 16 +- vl.c | 12 +- 22 files changed, 637 insertions(+), 847 deletions(-)