Re: [Qemu-devel] [PATCH v3 6/7] qom: add a object_property_add_enum helper method

2015-05-12 Thread Daniel P. Berrange
On Fri, May 08, 2015 at 07:45:10PM +0200, Andreas Färber wrote: > Am 01.05.2015 um 12:30 schrieb Daniel P. Berrange: > > Looks good in general. Some minor nits below, and one limitation > possibly worth mentioning in the second paragraph of the commit message: > It assumes a 1:1 mapping. I do gues

Re: [Qemu-devel] [PATCH v3 6/7] qom: add a object_property_add_enum helper method

2015-05-08 Thread Andreas Färber
Am 01.05.2015 um 12:30 schrieb Daniel P. Berrange: > A QOM property can be parsed as enum using the visit_type_enum() > helper method, but this forces callers to use the more complex > generic object_property_add() method when registering it. It > also requires that users of that object have access

[Qemu-devel] [PATCH v3 6/7] qom: add a object_property_add_enum helper method

2015-05-01 Thread Daniel P. Berrange
A QOM property can be parsed as enum using the visit_type_enum() helper method, but this forces callers to use the more complex generic object_property_add() method when registering it. It also requires that users of that object have access to the string map when they want to read the property valu