On 12/16/2011 04:54 PM, Anthony Liguori wrote:
On 12/16/2011 09:42 AM, Paolo Bonzini wrote:
On 12/16/2011 04:23 PM, Anthony Liguori wrote:
Ok. I think nullable strings are not a good idea simply because it
means that a property can have a state that cannot be set.
How is this different from NULL links? (Honest, not trick question :)).
An empty string == NULL for links.
If a pointer is NULL, an empty string is returned. So get/set is full
symmetric.
Ok, so we can do the same for "pointer" properties. I'm just a bit
worried about serial numbers, where "-device virtio-blk-pci,...,serial="
is different from no serial at all. One shows "" in info qtree, the
other shows <null>.
For JSON, but it doesn't map to a config file easily nor does it map to
command line syntax well.
You can force nullable properties to have a null default (which is now
the case in qdev), but I agree that's not too nice.
Paolo