On 11/05/2017 13:59, Markus Armbruster wrote: > > What I don't like is enumerating PropertyInfo in helpers. A relatively > straightforward way to avoid this would be moving the part of > qdev_property_add_static() that varies between properties into a new > PropertyInfo method. Assumes that *all* instances of the same > PropertyInfo should behave the same. Paolo, is that the case?
Yes, it is the case, and yes, a virtual method such as void (*init_default_value)(DeviceState *dev, Property *prop) would be much better. Thanks, Paolo