[Libvirt-cim] [PATCH 1 of 3] Cleanup device_type_from_poolid() in DevicePool

Kaitlin Rupert kaitlin at linux.vnet.ibm.com
Fri Dec 21 16:22:08 UTC 2007


Dan Smith wrote:
> KR> Change device_type_from_poolid() to device_type_from_str() so that
> KR> this function can be used for DevicePool classnames as well as
> KR> InstanceIDs.
> 
> How about device_type_from_id()?  The "from_str" sounds like instance
> parsing or something like that.  ID could mean DeviceID or InstanceID.
> 

The change to "from_str()" here is so that one would be able to pass the 
classname in.  The logic for determining the device / pool type is the 
same for the InstanceID and the classname.

But if this is confusing, I could change the name to something else. 
Or, I could add 2 wrapper functions with clearer names.

-- 
Kaitlin Rupert
IBM Linux Technology Center
karupert at us.ibm.com




More information about the Libvirt-cim mailing list