KR> - type = device_type_from_poolid(poolid);
KR> + type = device_type_from_str(class_base_name(CLASSNAME(ref)));
A couple things here. First, I think that we should be passing in the
id, in case we need to do more specific checking in the future. We
can check the classname of the ref separately.
Second, class_base_name() returns a strdup()'d string, so you leak
that here.
--
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms(a)us.ibm.com