[Libvirt-cim] [PATCH 1 of 3] Add input support to xmlgen, add get_input_type_bus_from_cap() to Virt_Device
Dan Smith
danms at us.ibm.com
Wed Nov 26 15:32:20 UTC 2008
KR> +int get_input_type_bus_from_cap(const char *cap,
KR> + char **type,
KR> + char **bus,
KR> + char **virt_type)
KR> +{
KR> + if (sscanf(cap, "%a[^ ] %a[^ ] %as", virt_type, bus, type) != 3) {
KR> + if (sscanf(cap, "%a[^ ] %as", bus, type) != 2)
I don't like this at all. I think the caption field should be rather
free-form and human-oriented. If we do this, then we have to update
this cascading if to support more and more caption formats in the
future.
Can we do this in a different way?
--
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms at us.ibm.com
More information about the Libvirt-cim
mailing list