This has gotten a little messy and disjoint, so I'm definitely in
favor of cleaning it up.
HE> -#define CIM_RASD_TYPE_PROC 3
HE> -#define CIM_RASD_TYPE_MEM 4
HE> -#define CIM_RASD_TYPE_NET 10
HE> -#define CIM_RASD_TYPE_DISK 17
HE> +#define CIM_TYPE_ALL 0
HE> +#define CIM_RES_TYPE_PROC 3
HE> +#define CIM_RES_TYPE_MEM 4
HE> +#define CIM_RES_TYPE_NET 10
HE> +#define CIM_RES_TYPE_DISK 17
HE> +#define CIM_RES_TYPE_UNKNOWN 1000
HE> +
HE> +#define CIM_RASD_TYPE_PROC CIM_RES_TYPE_PROC
HE> +#define CIM_RASD_TYPE_MEM CIM_RES_TYPE_MEM
HE> +#define CIM_RASD_TYPE_NET CIM_RES_TYPE_NET
HE> +#define CIM_RASD_TYPE_DISK CIM_RES_TYPE_DISK
HE> +
HE> +#define CIM_POOL_TYPE_ALL CIM_TYPE_ALL
HE> +#define CIM_POOL_TYPE_PROC CIM_RES_TYPE_PROC
HE> +#define CIM_POOL_TYPE_MEM CIM_RES_TYPE_MEM
HE> +#define CIM_POOL_TYPE_NET CIM_RES_TYPE_NET
HE> +#define CIM_POOL_TYPE_DISK CIM_RES_TYPE_DISK
HE> +#define CIM_POOL_TYPE_UNKNOWN CIM_RES_TYPE_UNKNOWN
I know that in several places, we assume that a device type is the
same as the CIM resource type. Above, you define CIM_RASD_TYPE_foo to
CIM_RES_TYPE_foo, presumably to avoid having to touch all the places
that use the former. I think to reduce ambiguity and to enforce the
fact that these must remain the same, it would be better to just
change CIM_RASD_TYPE_foo to CIM_RES_TYPE_foo everywhere.
Thoughts?
--
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms(a)us.ibm.com