Received: from eggs.gnu.org ([2001:4830:134:3::10]:59925) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bO4oI-0005aF-PH for qemu-devel@nongnu.org; Fri, 15 Jul 2016 11:13:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bO4oE-0001Mz-9l for qemu-devel@nongnu.org; Fri, 15 Jul 2016 11:13:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47363) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bO4oE-0001Mj-4U for qemu-devel@nongnu.org; Fri, 15 Jul 2016 11:13:46 -0400 From: Markus Armbruster References: <1468505019-18154-1-git-send-email-berrange@redhat.com> <1468505019-18154-3-git-send-email-berrange@redhat.com> Date: Fri, 15 Jul 2016 17:13:41 +0200 In-Reply-To: <1468505019-18154-3-git-send-email-berrange@redhat.com> (Daniel P. Berrange's message of "Thu, 14 Jul 2016 15:03:34 +0100") Message-ID: <87oa5zc4t6.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v8 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" Cc: qemu-devel@nongnu.org, Max Reitz , =?utf-8?Q?Marc?= =?utf-8?Q?-Andr=C3=A9?= Lureau , Paolo Bonzini , Andreas =?utf-8?Q?F=C3=A4rber?= "Daniel P. Berrange" writes: > 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. > > 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. Baroque. But you're merely making things consistently baroque. > Also make parse_option_number() non-static to allow > for similar reuse later. > > Reviewed-by: Marc-Andr=C3=A9 Lureau > Reviewed-by: Eric Blake > Signed-off-by: Daniel P. Berrange Reviewed-by: Markus Armbruster