From: "Andreas Färber" <afaerber@suse.de>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: "Kevin Wolf" <kwolf@redhat.com>,
"Blue Swirl" <blauwirbel@gmail.com>,
"Anthony Liguori" <aliguori@us.ibm.com>,
"Juan Quintela" <quintela@redhat.com>,
"qemu-trivial@nongnu.org" <qemu-trivial@nongnu.org>,
"Markus Armbruster" <armbru@redhat.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"Vasilis Liaskovitis" <vasilis.liaskovitis@profitbricks.com>,
"Andreas Färber" <andreas.faerber@web.de>,
"Amit Shah" <amit.shah@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v6] qdev: Add support for property type bool
Date: Tue, 24 Jan 2012 18:38:16 +0100 [thread overview]
Message-ID: <4F1EEC88.8060803@suse.de> (raw)
In-Reply-To: <4F1EEA64.2080704@siemens.com>
Am 24.01.2012 18:29, schrieb Jan Kiszka:
> On 2012-01-24 18:17, Andreas Färber wrote:
>> From: Andreas Färber <andreas.faerber@web.de>
>>
>> VMState supports the type bool but qdev instead supports bit, backed by
>> uint32_t. Therefore let's add DEFINE_PROP_BOOL() and qdev_prop_set_bool().
>>
>> 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 at
>> a later point in time.
>
> 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=on/off makes a
great deal of sense in English (noun), but not enabled=off (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 = {
>> + .name = "bool",
>
> 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
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
next prev parent reply other threads:[~2012-01-24 17:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-24 17:17 [Qemu-devel] [PATCH v6] qdev: Add support for property type bool Andreas Färber
2012-01-24 17:29 ` Jan Kiszka
2012-01-24 17:38 ` Andreas Färber [this message]
2012-01-24 17:59 ` Anthony Liguori
2012-01-24 17:59 ` Jan Kiszka
2012-01-26 15:02 ` Andreas Färber
2012-01-27 6:23 ` Stefan Hajnoczi
2012-01-27 9:38 ` Andreas Färber
2012-01-27 12:41 ` Anthony Liguori
2012-01-27 13:22 ` Andreas Färber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F1EEC88.8060803@suse.de \
--to=afaerber@suse.de \
--cc=aliguori@us.ibm.com \
--cc=amit.shah@redhat.com \
--cc=andreas.faerber@web.de \
--cc=armbru@redhat.com \
--cc=blauwirbel@gmail.com \
--cc=jan.kiszka@siemens.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=quintela@redhat.com \
--cc=vasilis.liaskovitis@profitbricks.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).