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(a)us.ibm.com