[Libvirt-cim] [PATCH 4 of 4] Make VSMS not parse the InstanceID of a RASD, but rather use the proper fields

Kaitlin Rupert kaitlin at linux.vnet.ibm.com
Tue Apr 15 15:48:20 UTC 2008


>  static const char *xen_net_rasd_to_vdev(CMPIInstance *inst,
>                                          struct virt_device *dev)
>  {
> +        const char *val = NULL;
> +
>          free(dev->dev.net.type);
> -        dev->dev.net.type = strdup("bridge");
> +        dev->dev.net.type = strdup("network");
> +
> +        if (cu_get_str_prop(inst, "PoolID", &val) != CMPI_RC_OK)
> +                val = _default_network(inst);
> +
> +        if (val == NULL)
> +                return 0;

This should return an error string, since the function returns a char *.

I missed this in the last set, I think. I wouldn't complain though if 
this change came as a follow up patch so you don't have to resend the 
whole set.  ;)

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




More information about the Libvirt-cim mailing list