From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58983) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNVWe-0002i2-Ad for qemu-devel@nongnu.org; Wed, 13 Jul 2016 21:33:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNVWa-0007g6-6U for qemu-devel@nongnu.org; Wed, 13 Jul 2016 21:33:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34740) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNVWZ-0007fa-UV for qemu-devel@nongnu.org; Wed, 13 Jul 2016 21:33:12 -0400 References: <1467724312-9378-1-git-send-email-berrange@redhat.com> <1467724312-9378-3-git-send-email-berrange@redhat.com> From: Eric Blake Message-ID: <5786EBD5.7010205@redhat.com> Date: Wed, 13 Jul 2016 19:33:09 -0600 MIME-Version: 1.0 In-Reply-To: <1467724312-9378-3-git-send-email-berrange@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ruIfMsssGB0m8VeRTORuqBPLSR1I4V0vO" Subject: Re: [Qemu-devel] [PATCH v7 2/7] option: make parse_option_bool/number non-static List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , qemu-devel@nongnu.org Cc: Markus Armbruster , Max Reitz , =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= , Paolo Bonzini , =?UTF-8?Q?Andreas_F=c3=a4rber?= This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ruIfMsssGB0m8VeRTORuqBPLSR1I4V0vO From: Eric Blake To: "Daniel P. Berrange" , qemu-devel@nongnu.org Cc: Markus Armbruster , Max Reitz , =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= , Paolo Bonzini , =?UTF-8?Q?Andreas_F=c3=a4rber?= Message-ID: <5786EBD5.7010205@redhat.com> Subject: Re: [Qemu-devel] [PATCH v7 2/7] option: make parse_option_bool/number non-static References: <1467724312-9378-1-git-send-email-berrange@redhat.com> <1467724312-9378-3-git-send-email-berrange@redhat.com> In-Reply-To: <1467724312-9378-3-git-send-email-berrange@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 07/05/2016 07:11 AM, Daniel P. Berrange wrote: > The opts-visitor.c opts_type_bool() method has code for > parsing a string to set a bool value, as does the > qemu-option.c parse_option_bool() method, except it > handles fewer cases. >=20 > To enable consistency across the codebase, extend > parse_option_bool() to handle "yes", "no", "y" and > "n", and make it non-static. Convert the opts > visitor to call this method directly. >=20 > Also make parse_option_number() non-static to allow > for similar reuse later. >=20 > Reviewed-by: Marc-Andr=C3=A9 Lureau > Signed-off-by: Daniel P. Berrange > --- > include/qemu/option.h | 4 ++++ > qapi/opts-visitor.c | 19 +------------------ > util/qemu-option.c | 27 ++++++++++++++++----------- > 3 files changed, 21 insertions(+), 29 deletions(-) >=20 Reviewed-by: Eric Blake I'm going to include this in my proposed fallback patches on my qapi subset F series, where we may need to "fix" netdev_add to care about back-compat parsing of a string where an integer is expected. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --ruIfMsssGB0m8VeRTORuqBPLSR1I4V0vO 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/ iQEcBAEBCAAGBQJXhuvWAAoJEKeha0olJ0NqtbUH/1oie9qQ71N2YlMnmDxm+Hvf R1h3ZILpUH8e+sPxv2jwAQXDZq40rV4+hnc6IKuD67sYBagqMLblGPMrpeQyLrHX v5DDvZ1f0yuOjuP6tJP15EvLxuVSmjSOvqDtspzG3LOwlKE5AsuEASbD8UI9DdNW dhVMh9xfTDU91vPWjZid2ZC5chEclDVnmG+ChGGRW4P4pJNVi+o+WxLxcDvPYhXy 8MFord9QS2gZ7xTH6e/KhjrLBP2qh+dgiI3Zil/WSXvzrTGklVQ+uI74NjfD8GYQ SfqhfjjsfxKZLouay440dABGUbDW2uT2G7w/HrQFr4JelpNww8CVduKLZJz/eoo= =F3jg -----END PGP SIGNATURE----- --ruIfMsssGB0m8VeRTORuqBPLSR1I4V0vO--