[Libvirt-cim] [PATCH 1 of 2] SDC: returned instances are not of type specific subclass

Dan Smith danms at us.ibm.com
Thu Dec 13 17:05:10 UTC 2007


HE> +        char *base = NULL;

This should be a const char *.

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?

-- 
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms at us.ibm.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvirt-cim/attachments/20071213/b7ce51e2/attachment.sig>


More information about the Libvirt-cim mailing list