From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:56879) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpkMD-00056A-Sh for qemu-devel@nongnu.org; Tue, 24 Jan 2012 12:40:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RpkM7-0004Oc-RU for qemu-devel@nongnu.org; Tue, 24 Jan 2012 12:40:33 -0500 Message-ID: <4F1EEC88.8060803@suse.de> Date: Tue, 24 Jan 2012 18:38:16 +0100 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1327425457-31313-1-git-send-email-afaerber@suse.de> <4F1EEA64.2080704@siemens.com> In-Reply-To: <4F1EEA64.2080704@siemens.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v6] qdev: Add support for property type bool List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Kevin Wolf , Blue Swirl , Anthony Liguori , Juan Quintela , "qemu-trivial@nongnu.org" , Markus Armbruster , "qemu-devel@nongnu.org" , Vasilis Liaskovitis , =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= , Amit Shah , Paolo Bonzini Am 24.01.2012 18:29, schrieb Jan Kiszka: > On 2012-01-24 18:17, Andreas F=C3=A4rber wrote: >> From: Andreas F=C3=A4rber >> >> VMState supports the type bool but qdev instead supports bit, backed b= y >> uint32_t. Therefore let's add DEFINE_PROP_BOOL() and qdev_prop_set_boo= l(). >> >> bool by definition is either true or false. Should the need arise to >> parse yes/no, on/off, 1/0 or whatever as well, we can still add that a= t >> a later point in time. >=20 > To make it a real replacement for PROP_TYPE_BIT, let's use on/off, also > for printing. Not only programmers may use this interface. ;) Actually non-programmers are the reason for this: cache=3Don/off makes a great deal of sense in English (noun), but not enabled=3Doff (adjective), which was my use case of this patch for ISA devices. I'm fine with accepting the whole range of possibilities for parsing. For printing I see no reason to, since there's no legacy users of this new type we could break. true/false seemed better than yes/no. >> +PropertyInfo qdev_prop_bool =3D { >> + .name =3D "bool", >=20 > Now we have "bool" and "boolean". Can we rename the latter to bit? I'd be fine with that, just don't know if that would break anything elsewhere for qdev or QOM? Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg