[Libvirt-cim] [PATCH 01 of 10] Add Resource Pool types to svpc_types.h
Kaitlin Rupert
kaitlin at linux.vnet.ibm.com
Thu Mar 6 16:46:45 UTC 2008
Dan Smith wrote:
> HE> struct virt_device {
> HE> enum {
> HE> - VIRT_DEV_NET = CIM_RASD_TYPE_NET,
> HE> - VIRT_DEV_DISK = CIM_RASD_TYPE_DISK,
> HE> - VIRT_DEV_MEM = CIM_RASD_TYPE_MEM,
> HE> - VIRT_DEV_VCPU = CIM_RASD_TYPE_PROC,
> HE> - VIRT_DEV_UNKNOWN = 1000,
> HE> + VIRT_DEV_NET = CIM_RES_TYPE_NET,
> HE> + VIRT_DEV_DISK = CIM_RES_TYPE_DISK,
> HE> + VIRT_DEV_MEM = CIM_RES_TYPE_MEM,
> HE> + VIRT_DEV_VCPU = CIM_RES_TYPE_PROC,
> HE> + VIRT_DEV_UNKNOWN = CIM_RES_TYPE_UNKNOWN,
> HE> VIRT_DEV_EMU,
> HE> VIRT_DEV_GRAPHICS,
> HE> } type;
>
> Are the VIRT_DEV_foo constants used anywhere else? It looks to me
> that they are mostly stripped out, with the exception of maybe some of
> the device_parsing stuff.
>
> I don't think it's a good idea to set dev->type=A in device_parsing,
> but check for dev->type==B everywhere else, even though we know A==B.
> Do you mind if we try to make this a clean change instead of an
> incremental one?
>
> I think breaking out the first few patches into a separate set to do
> the switchover is appropriate.
It'll end up being one large set though, or several smaller sets all
dependent on one another. The "#2 - Add configurable enum_devices() to
Device provider and Adopt interface changes to SD & EAFP" also removes
some of the VIRT_DEV_* types.
--
Kaitlin Rupert
IBM Linux Technology Center
kaitlin at linux.vnet.ibm.com
More information about the Libvirt-cim
mailing list