[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC v2 7/7] remove QEMUOptionParameter
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [RFC v2 7/7] remove QEMUOptionParameter |
Date: |
Thu, 27 Sep 2012 14:03:27 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 |
Il 27/09/2012 07:14, Dong Xu Wang ha scritto:
> remove QEMUOptionParameter, and use QemuOpts and QemuOptsList.
>
> Signed-off-by: Dong Xu Wang <address@hidden>
> ---
> block.c | 88 ++++++------
> block.h | 5 +-
> block/Makefile.objs | 9 +-
> block/qcow2.c | 175 ++++++++++++-----------
> block/raw-posix.c | 68 ++++-----
> block/raw.c | 31 +++--
> block_int.h | 6 +-
> qemu-config.c | 3 +
> qemu-img.c | 58 ++++----
> qemu-option.c | 408
> +++++++++++++++------------------------------------
> qemu-option.h | 45 +-----
> 11 files changed, 347 insertions(+), 549 deletions(-)
The patch is already quite big, so please move the qemu-option.c changes
to separate patches.
For example, patch 7 could add def_value and use it in qemu_opts_print.
Patch 8 should add append_opts_list, free_opts_list, print_opts_list.
Patch 9 should touch only the block layer. Patch 10 should remove the
now-unuse QEMUOptionParameter code.
(Regarding def_value, it is quite unintuitive that you need to specify
the value again when calling qemu_opt_get_*. Perhaps,
qemu_opts_validate could instead walk through descriptors that are not
present but have a default value, and add new options with the default
value to the QemuOpts object).
Paolo
- [Qemu-devel] [RFC v2 0/7] replace QEMUOptionParameter with QemuOpts parser, Dong Xu Wang, 2012/09/27
- [Qemu-devel] [RFC v2 1/7] qemu-option: qemu_opt_set_bool(): fix code duplication, Dong Xu Wang, 2012/09/27
- [Qemu-devel] [RFC v2 2/7] qemu-option: opt_set(): split it up into more functions, Dong Xu Wang, 2012/09/27
- [Qemu-devel] [RFC v2 3/7] qemu-option: qemu_opts_validate(): fix duplicated code, Dong Xu Wang, 2012/09/27
- [Qemu-devel] [RFC v2 4/7] introduce qemu_opts_create_nofail function, Dong Xu Wang, 2012/09/27
- [Qemu-devel] [RFC v2 5/7] use qemu_opts_create_nofail, Dong Xu Wang, 2012/09/27
- [Qemu-devel] [RFC v2 6/7] create new function: qemu_opt_set_number, Dong Xu Wang, 2012/09/27
- [Qemu-devel] [RFC v2 7/7] remove QEMUOptionParameter, Dong Xu Wang, 2012/09/27
- Re: [Qemu-devel] [RFC v2 7/7] remove QEMUOptionParameter,
Paolo Bonzini <=