[Libvirt-cim] [PATCH 2 of 2] Add ability to get a default pool of a given type to the pool provider

Kaitlin Rupert kaitlin at linux.vnet.ibm.com
Mon Apr 14 20:12:53 UTC 2008


> +        } else if (type == CIM_RES_TYPE_DISK) {
> +                *s = enum_pools(broker, reference, type, &list);
> +                if (s->rc == CMPI_RC_OK)
> +                        inst = list.list[0];
> +        } else if (type == CIM_RES_TYPE_NET) {
> +                *s = enum_pools(broker, reference, type, &list);
> +                if (s->rc == CMPI_RC_OK)
> +                        inst = list.list[0];

I somehow missed this last time - you could collapse these statements 
into one else if.  However, I think having the statements parallel the 
PROC and MEM statements is easier to read (and easier to change later on 
if need be).

+1

-- 
Kaitlin Rupert
IBM Linux Technology Center
kaitlin at linux.vnet.ibm.com




More information about the Libvirt-cim mailing list