qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/4] virtio-serial: Clean up virtser_bus_dev_pri


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH 2/4] virtio-serial: Clean up virtser_bus_dev_print() output
Date: Wed, 29 Jun 2011 20:33:18 +0200

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]