Re: [PATCH v2 07/25] conf: Add virDomainDeviceSetData

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2019-01-23 at 16:32 -0500, Cole Robinson wrote:
[...]
> +/**
> + * virDomainDeviceSetData
> + * @device: virDomainDeviceDefPtr with ->type filled in
> + * @data: *DefPtr data for a device. Ex: virDomainDiskDefPtr
> + *
> + * Set the data.X variable for the device->type value. Basically
> + * a mapping of virDomainDeviceType to the associated name in
> + * the virDomainDeviceDef union
> + */
> +void
> +virDomainDeviceSetData(virDomainDeviceDefPtr device,
> +                       void *devicedata)

Documentation doesn't match signature: use either 'devicedata'
or 'data' in both cases. I personally prefer the latter, but either
one is fine :)

Additionally, please move both the implementation...

[...]
> @@ -2937,6 +2937,9 @@ virDomainDeviceDefPtr virDomainDeviceDefCopy(virDomainDeviceDefPtr src,
>  virDomainDeviceInfoPtr virDomainDeviceGetInfo(virDomainDeviceDefPtr device);
>  void virDomainTPMDefFree(virDomainTPMDefPtr def);
>  
> +void virDomainDeviceSetData(virDomainDeviceDefPtr device,
> +                            void *devicedata);
> +

... and the declaration right after virDomainDeviceGetInfo(), as
they're very closely related.

With the above addressed,

  Reviewed-by: Andrea Bolognani <abologna@xxxxxxxxxx>

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux