Hi,
Am 29.06.2011 um 10:33 schrieb Gerd Hoffmann:
Erm, I'm not aware that my qdev bool patch got committed yet, so the
question of how to parse/print bool properties (on/off vs. yes/no) is
still undecided, no comments so far. It would be entirely possible to
let the author decide that on a case-by-case basis by using different
property type enums for the same 'bool' type.
Just accept both "on" and "yes" for true and both "off" and "no" for
false?
That's exactly what the patch does, in Markus' parse_bit() among others:
http://patchwork.ozlabs.org/patch/100271/
For printing we'll have to pick one though. I'd tend to pick on/off
as I guess most properties will enable or disable some feature. Or
have the two enums ...
Like I wrote in another thread, on/off only applies to nouns, not
adjectives like "enabled". I'll revisit this topic the weekend.
Andreas