From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33518) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bq22A-0004No-Ak for qemu-devel@nongnu.org; Fri, 30 Sep 2016 13:55:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bq225-0000lp-44 for qemu-devel@nongnu.org; Fri, 30 Sep 2016 13:55:42 -0400 References: <1475246744-29302-1-git-send-email-berrange@redhat.com> <1475246744-29302-9-git-send-email-berrange@redhat.com> From: Eric Blake Message-ID: <51edf71d-c6df-c069-16eb-373614dd9522@redhat.com> Date: Fri, 30 Sep 2016 12:55:31 -0500 MIME-Version: 1.0 In-Reply-To: <1475246744-29302-9-git-send-email-berrange@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="TOpRJfIa9tBcpFPG406xMcUtK36OdjaWu" Subject: Re: [Qemu-devel] [PATCH v14 08/21] qapi: allow QObjectInputVisitor to be created with QemuOpts List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Max Reitz , Paolo Bonzini , =?UTF-8?Q?Andreas_F=c3=a4rber?= This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --TOpRJfIa9tBcpFPG406xMcUtK36OdjaWu From: Eric Blake To: "Daniel P. Berrange" , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Max Reitz , Paolo Bonzini , =?UTF-8?Q?Andreas_F=c3=a4rber?= Message-ID: <51edf71d-c6df-c069-16eb-373614dd9522@redhat.com> Subject: Re: [PATCH v14 08/21] qapi: allow QObjectInputVisitor to be created with QemuOpts References: <1475246744-29302-1-git-send-email-berrange@redhat.com> <1475246744-29302-9-git-send-email-berrange@redhat.com> In-Reply-To: <1475246744-29302-9-git-send-email-berrange@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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. >=20 > 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. >=20 > Signed-off-by: Daniel P. Berrange > --- > +++ b/include/qemu/option.h > @@ -125,7 +125,7 @@ void qemu_opts_set_defaults(QemuOptsList *list, con= st 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 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --TOpRJfIa9tBcpFPG406xMcUtK36OdjaWu Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJX7qcTAAoJEKeha0olJ0NqdzwH/R5Z29F7E3N6AW/tLfqvzkrT Kt6SuBUFq2nadYSm8C6Q9XbwyYUI1VOxzi1PZIRzHZPZ8VBd5W+de+2urbl5S3M6 FGWOeeiFy8g3zBb+g2VqH+XuWHr3tFzbMJNFgPIrJCb0Nwro+iyIJRPlz+KfdPp0 uaozvHeQYk/BJirsQA6SZlve4ESlT4Nd2E2cyKt6Kwby1VVzTqNf0fmCY72Ob4N7 xwnucpEfrVKhPxm1F3j86SUblb/+L0dNTeRkYyvd+UEmRWdImgHNNj/rp7q4iXVK GDfT69eWikjKWcigq2EZt7EYznaVG+Ll0aYxXq2GQoRWvMvTGxvJTG0XH0wZKR8= =C+7k -----END PGP SIGNATURE----- --TOpRJfIa9tBcpFPG406xMcUtK36OdjaWu--