[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V26 12/32] change block layer to support both Qe
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH V26 12/32] change block layer to support both QemuOpts and QEMUOptionParamter |
Date: |
Tue, 29 Apr 2014 19:57:18 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 |
On 04/29/2014 03:10 AM, Chunyan Liu wrote:
> Change block layer to support both QemuOpts and QEMUOptionParameter.
> After this patch, it will change backend drivers one by one. At the end,
> QEMUOptionParameter will be removed and only QemuOpts is kept.
>
> Signed-off-by: Dong Xu Wang <address@hidden>
> Signed-off-by: Chunyan Liu <address@hidden>
> ---
> Changes to V25:
> * fix Eric's comments:
> * update bdrv_create_co_entry and bdrv_amend_options code, to let it
> more readable.
> * add assertion in bdrv_register.
> * improve comments to create_opts in header file.
>
> block.c | 158
> ++++++++++++++++++++++++++++++++--------------
> block/cow.c | 2 +-
> block/qcow.c | 2 +-
> block/qcow2.c | 2 +-
> block/qed.c | 2 +-
> block/raw_bsd.c | 2 +-
> block/vhdx.c | 2 +-
> block/vmdk.c | 4 +-
> block/vvfat.c | 2 +-
> include/block/block.h | 7 +-
> include/block/block_int.h | 13 +++-
> qemu-img.c | 94 +++++++++++++--------------
> 12 files changed, 180 insertions(+), 110 deletions(-)
>
>
> - if (options) {
> - param = parse_option_parameters(options, create_options, param);
> - if (param == NULL) {
> - error_report("Invalid options for file format '%s'.", out_fmt);
> - ret = -1;
> - goto out;
> - }
> - } else {
> - param = parse_option_parameters("", create_options, param);
> + opts = qemu_opts_create(create_opts, NULL, 0, &error_abort);
> + if (options && qemu_opts_do_parse(opts, options, NULL)) {
> + error_report("Invalid options for file format '%s'.", out_fmt);
Pre-existing, but error messages shouldn't end in '.' Trivial enough to
not stop the review.
Yay! I like it! It's looking a lot better with all the fixes you've
folded in.
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH V26 02/32] QemuOpts: add def_value_str to QemuOptDesc, (continued)
- [Qemu-devel] [PATCH V26 04/32] qapi: output def_value_str when query command line options, Chunyan Liu, 2014/04/29
- [Qemu-devel] [PATCH V26 05/32] QemuOpts: change opt->name|str from (const char *) to (char *), Chunyan Liu, 2014/04/29
- [Qemu-devel] [PATCH V26 08/32] QemuOpts: add qemu_opts_print_help to replace print_option_help, Chunyan Liu, 2014/04/29
- [Qemu-devel] [PATCH V26 10/32] QemuOpts: add qemu_opts_append to replace append_option_parameters, Chunyan Liu, 2014/04/29
- [Qemu-devel] [PATCH V26 09/32] QemuOpts: add conversion between QEMUOptionParameter to QemuOpts, Chunyan Liu, 2014/04/29
- [Qemu-devel] [PATCH V26 11/32] QemuOpts: check NULL input for qemu_opts_del, Chunyan Liu, 2014/04/29
- [Qemu-devel] [PATCH V26 06/32] QemuOpts: move qemu_opt_del ahead for later calling, Chunyan Liu, 2014/04/29
- [Qemu-devel] [PATCH V26 12/32] change block layer to support both QemuOpts and QEMUOptionParamter, Chunyan Liu, 2014/04/29
- Re: [Qemu-devel] [PATCH V26 12/32] change block layer to support both QemuOpts and QEMUOptionParamter,
Eric Blake <=
- [Qemu-devel] [PATCH V26 07/32] QemuOpts: add qemu_opt_get_*_del functions for replace work, Chunyan Liu, 2014/04/29
- [Qemu-devel] [PATCH V26 13/32] vvfat.c: handle cross_driver's create_options and create_opts, Chunyan Liu, 2014/04/29
- [Qemu-devel] [PATCH V26 14/32] cow.c: replace QEMUOptionParameter with QemuOpts, Chunyan Liu, 2014/04/29
- [Qemu-devel] [PATCH V26 15/32] gluster.c: replace QEMUOptionParameter with QemuOpts, Chunyan Liu, 2014/04/29
- [Qemu-devel] [PATCH V26 18/32] qcow.c: replace QEMUOptionParameter with QemuOpts, Chunyan Liu, 2014/04/29
- [Qemu-devel] [PATCH V26 16/32] iscsi.c: replace QEMUOptionParameter with QemuOpts, Chunyan Liu, 2014/04/29
- [Qemu-devel] [PATCH V26 19/32] qcow2.c: replace QEMUOptionParameter with QemuOpts, Chunyan Liu, 2014/04/29
- [Qemu-devel] [PATCH V26 17/32] nfs.c: replace QEMUOptionParameter with QemuOpts, Chunyan Liu, 2014/04/29
- [Qemu-devel] [PATCH V26 20/32] qed.c: replace QEMUOptionParameter with QemuOpts, Chunyan Liu, 2014/04/29
- [Qemu-devel] [PATCH V26 21/32] raw-posix.c: replace QEMUOptionParameter with QemuOpts, Chunyan Liu, 2014/04/29