[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v14 08/21] qapi: allow QObjectInputVisitor to be
From: |
Eric Blake |
Subject: |
Re: [Qemu-block] [PATCH v14 08/21] qapi: allow QObjectInputVisitor to be created with QemuOpts |
Date: |
Fri, 30 Sep 2016 12:55:31 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 |
On 09/30/2016 09:45 AM, Daniel P. Berrange wrote:
> Instead of requiring all callers to go through the mutli-step
> process of turning QemuOpts into a suitable QObject for visiting,
> add a new constructor that encapsulates this logic. This will
> allow QObjectInputVisitor to be a drop-in replacement for the
> existing OptsVisitor with minimal code changes for callers.
>
> NB, at this point it is only supporting opts syntax which
> explicitly matches the QAPI schema structure, so is not yet
> a true drop-in replacement for OptsVisitor. The patches that
> follow will add the special cases requird for full backwards
s/requird/required/
> compatibility with OptsVisitor.
>
> Signed-off-by: Daniel P. Berrange <address@hidden>
> ---
> +++ b/include/qemu/option.h
> @@ -125,7 +125,7 @@ void qemu_opts_set_defaults(QemuOptsList *list, const
> char *params,
> int permit_abbrev);
> QemuOpts *qemu_opts_from_qdict(QemuOptsList *list, const QDict *qdict,
> Error **errp);
> -QDict *qemu_opts_to_qdict(QemuOpts *opts, QDict *qdict);
> +QDict *qemu_opts_to_qdict(const QemuOpts *opts, QDict *qdict);
> void qemu_opts_absorb_qdict(QemuOpts *opts, QDict *qdict, Error **errp);
Should the const-correctness of this parameter be hoisted to any earlier
patch? But here is fine, as the first place where the compiler requires it.
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
- [Qemu-block] [PATCH v14 02/21] qdict: implement a qdict_crumple method for un-flattening a dict, (continued)
- [Qemu-block] [PATCH v14 02/21] qdict: implement a qdict_crumple method for un-flattening a dict, Daniel P. Berrange, 2016/09/30
- [Qemu-block] [PATCH v14 03/21] qapi: add trace events for visitor, Daniel P. Berrange, 2016/09/30
- [Qemu-block] [PATCH v14 04/21] qapi: rename QmpInputVisitor to QObjectInputVisitor, Daniel P. Berrange, 2016/09/30
- [Qemu-block] [PATCH v14 05/21] qapi: rename QmpOutputVisitor to QObjectOutputVisitor, Daniel P. Berrange, 2016/09/30
- [Qemu-block] [PATCH v14 06/21] qapi: don't pass two copies of TestInputVisitorData to tests, Daniel P. Berrange, 2016/09/30
- [Qemu-block] [PATCH v14 07/21] qapi: permit scalar type conversions in QObjectInputVisitor, Daniel P. Berrange, 2016/09/30
- [Qemu-block] [PATCH v14 08/21] qapi: allow QObjectInputVisitor to be created with QemuOpts, Daniel P. Berrange, 2016/09/30
- Re: [Qemu-block] [PATCH v14 08/21] qapi: allow QObjectInputVisitor to be created with QemuOpts,
Eric Blake <=
- [Qemu-block] [PATCH v14 09/21] qapi: permit auto-creating single element lists, Daniel P. Berrange, 2016/09/30
- [Qemu-block] [PATCH v14 10/21] qapi: permit auto-creating nested structs, Daniel P. Berrange, 2016/09/30
- [Qemu-block] [PATCH v14 11/21] qapi: add integer range support for QObjectInputVisitor, Daniel P. Berrange, 2016/09/30
- [Qemu-block] [PATCH v14 12/21] option: allow qemu_opts_to_qdict to merge repeated options, Daniel P. Berrange, 2016/09/30
- [Qemu-block] [PATCH v14 13/21] qdict: allow qdict_crumple to accept compound types as values, Daniel P. Berrange, 2016/09/30
- [Qemu-block] [PATCH v14 14/21] qapi: allow repeated opts with qobject_input_visitor_new_opts, Daniel P. Berrange, 2016/09/30