[Libvirt-cim] [PATCH 1 of 3] Device: rename dom_device to enum_devices and make it configurable

Dan Smith danms at us.ibm.com
Wed Mar 5 17:22:56 UTC 2008


HE> +static CMPIStatus _get_devices(const CMPIBroker *broker,
HE> +                               const CMPIObjectPath *reference,
HE> +                               const virDomainPtr dom,
HE> +                               const uint16_t type,
HE> +                               struct inst_list *list)
HE> +{
HE> +        CMPIStatus s = {CMPI_RC_OK, NULL};
HE> +        struct virt_device *devs = NULL;
HE>          int count;
HE>          int i;
HE> -        struct virt_device *devs = NULL;

Please don't rearrange lines as part of a patch that does more than
just cleanups.

HE>          count = get_devices(dom, &devs, type);
HE>          if (count <= 0)
HE>                  goto out;
HE> -
HE> +                

You're adding leading whitespace here.

HE>          for (i = 0; i < count; i++) {
HE>                  CMPIInstance *dev = NULL;
HE> -
HE> -                dev = device_instance(broker, &devs[i], dom, ns);
HE> +                        
HE> +                dev = device_instance(broker, &devs[i], dom, NAMESPACE(reference));
HE>                  if (dev)
HE>                          inst_list_add(list, dev);
HE> -
HE> +                

...and here.

-- 
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/20080305/5b5b8751/attachment.sig>


More information about the Libvirt-cim mailing list