On 09/16/2014 11:54 PM, Markus Armbruster wrote: > Eric Blake <ebl...@redhat.com> writes: > >> On 09/16/2014 12:31 PM, Paolo Bonzini wrote: >> >>>> Change legacy_name to point to a detailed human-readable >>>> description of the type? >>>> E.g. "Ethernet 6-byte MAC Address, format: AA:BB:CC:DD:EE:FF"? >>> >>> If libvirt can cope with >>> >>> e1000.mac=str (Ethernet 6-byte MAC Address, format: AA:BB:CC:DD:EE:FF) >> >> Isn't this output only available under -help? Libvirt only cares about >> QMP listings of devices and their properties, so improving the human >> interface should have no negative impact to the machine interface. > > Libvirt still has code parsing this, see virQEMUCapsExtractDeviceStr(). > Whether it's actually used with recent QEMU I don't know.
That code is only used for qemu < 1.5 (when -help parsing is all we can use) - but those versions of qemu are not going to change -help output, and new versions of qemu use only QMP, so you are free to change it with no impact to libvirt. > > -device FOO,help merely formats qmp_device_list_properties()'s value for > human consumption. So, to make a description string available for help, > we also have to put it into the function's value. If we don't want it > in QMP, we need to filter it out in the command handler. Right now, > qmp_device_list_properties() *is* the command handler. > > Aside: why isn't the QMP command named query-device-list-properties? We > suck at consistency! > > -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature