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 <[email protected]> > Signed-off-by: Chunyan Liu <[email protected]> > --- > 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 <[email protected]>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
