On 12/16/2011 08:00 AM, Paolo Bonzini wrote:
On 12/16/2011 02:55 PM, Anthony Liguori wrote:
This is visible with
qom-get path=/i440fx/piix3 property=romfile
after static non-string properties are introduced.
I'm a bit confused about what's happening here. What's the significance
of non-string properties?
Should have been "static non-legacy properties".
When you don't have a value for a property, legacy properties are visited as
"<null>", while the new static properties do not pass anything to the visitor.
I stole this from qdev_property_get_str:
value = prop->get(dev, errp);
if (value) {
visit_type_str(v, &value, name, errp);
g_free(value);
}
I should more clearly document it. NULL would be only return if errp was set.
I just didn't want to introduce a local_err in order to be able to check whether
the function failed.
If a property function does not set the Error pointer, it must visit something.
Regards,
Anthony Liguori
Paolo