[libvirt] [PATCH v2 03/10] Add qemuMonitorJSONSetObjectProperty() method for QMP qom-set command

Eric Blake eblake at redhat.com
Thu Jul 11 16:15:43 UTC 2013


On 07/11/2013 08:05 AM, Michal Privoznik wrote:
> On 08.07.2013 21:20, John Ferlan wrote:
>> Add a new qemuMonitorJSONSetObjectProperty() method to support invocation
>> of the 'qom-set' JSON monitor command with a provided path, property, and
>> expected data type to set.
>>
>> The test code uses the same "/machine/i440fx" property as the get test and
>> attempts to set the "realized" property to "true" (which it should be set
>> at anyway).
>> ---
>> +    switch (prop->type) {
> 
> Again, this should be:
> 
> 
> switch ((qemuMonitorJSONObjectPropertyType) prop->type) {
> 

>> +    case QEMU_MONITOR_OBJECT_PROPERTY_STRING:
>> +        MAKE_SET_CMD("s:value", prop->val.str);
>> +        break;
>> +    case QEMU_MONITOR_OBJECT_PROPERTY_LAST:
>> +    default:
> 
> With these removed.

For the gcc enforcement of complete coverage of the enum, you have to
list the _LAST but drop the default:.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130711/0685df04/attachment-0001.sig>


More information about the libvir-list mailing list