[Libvirt-cim] [PATCH 1 of 2] SDC: returned instances are not of type specific subclass
Heidi Eckhart
heidieck at linux.vnet.ibm.com
Fri Dec 14 08:59:42 UTC 2007
Dan Smith wrote:
> HE> + char *base = NULL;
>
> This should be a const char *.
>
Good catch.
> HE> + switch(rasd->resource_type) {
> HE> + case CIM_RASD_TYPE_MEM:
> HE> + base = "MemResourceAllocationSettingData";
> HE> + break;
> HE> + case CIM_RASD_TYPE_PROC:
> HE> + base = "ProcResourceAllocationSettingData";
> HE> + break;
> HE> + case CIM_RASD_TYPE_NET:
> HE> + base = "NetResourceAllocationSettingData";
> HE> + break;
> HE> + case CIM_RASD_TYPE_DISK:
> HE> + base = "DiskResourceAllocationSettingData";
> HE> + break;
> HE> + default:
> HE> + cu_statusf(broker, s,
> HE> + CMPI_RC_ERR_FAILED,
> HE> + "Resource type not known");
> HE> + goto err;
> HE> + }
> HE> +
>
> Maybe this should be a helper function exposed in Virt_RASD.h, instead
> of buried in SDC?
A very good idea. I also did not like the length this function got due
to this change and putting it into a helper of RASD makes much more
sense. I will update the patch and resend it. Thanks.
--
Regards
Heidi Eckhart
Software Engineer
Linux Technology Center - Open Hypervisor
heidieck at linux.vnet.ibm.com
**************************************************
IBM Deutschland Entwicklung GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter
Geschaeftsfuehrung: Herbert Kircher
Sitz der Gesellschaft: Boeblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294
More information about the Libvirt-cim
mailing list