From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53630) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjVt9-0000Yx-VU for qemu-devel@nongnu.org; Fri, 14 Dec 2012 09:05:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TjVt8-0005Iz-Nv for qemu-devel@nongnu.org; Fri, 14 Dec 2012 09:05:19 -0500 Received: from mail-da0-f45.google.com ([209.85.210.45]:43279) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjVt8-0005Io-I9 for qemu-devel@nongnu.org; Fri, 14 Dec 2012 09:05:18 -0500 Received: by mail-da0-f45.google.com with SMTP id w4so1465686dam.4 for ; Fri, 14 Dec 2012 06:05:17 -0800 (PST) Sender: Dong Xu Wang From: Dong Xu Wang Date: Fri, 14 Dec 2012 22:04:47 +0800 Message-Id: <1355493891-22624-1-git-send-email-wdongxu@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH V8 0/4] 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. Patches 1 - 6 have been merged into block branch, so only patches 8 to 10 are included. v7->v8) 1) print "elements => accept any params" while opts_accepts_any() == true. 2) since def_print_str is the default value if an option isn't set, so rename it to def_value_str. 3) rebase to upstream source tree. 4) add gluster.c, raw-win32.c, and rbd.c. v6->v7: 1) Fix typo: enouth->enough. 2) use osdep.h:stringify(), not redefining new macro. 3) preserve TODO comment. 4) fix typo: BLOCK_OPT_ENCRYPT->BLOCK_OPT_STATIC. 5) initialize disk_type even when opts is NULL. v5->v6: 1) allocate enough space in append_opts_list function. 2) judge if opts == NULL in block layer create functions. 3) use bdrv_create_file(filename, NULL) in qcow_create funtion. 4) made more readable while using qemu_opt_get_number funtion. 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.