Re: [PATCH 09/10] conf: Provide missing virDomain*DefNew() functions

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

 



On Thu, Jun 29, 2017 at 20:04:02 +0200, Andrea Bolognani wrote:
> Same as virDomainDeviceInfo itself, any struct that
> embeds it needs to be initialized properly before use;
> however, none of the structs in question even had a
> proper allocation function defined.
> 
> Implement an allocation function for all structs
> embedding a virDomainDeviceInfo and use them instead
> of plain VIR_ALLOC() everywhere.
> 
> Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
> ---
>  src/bhyve/bhyve_parse_command.c |   4 +-
>  src/conf/domain_conf.c          | 280 +++++++++++++++++++++++++++++++---------
>  src/conf/domain_conf.h          |  15 +++
>  src/libvirt_private.syms        |  11 ++
>  src/openvz/openvz_conf.c        |   2 +-
>  src/qemu/qemu_command.c         |  12 +-
>  src/qemu/qemu_domain.c          |  11 +-
>  src/qemu/qemu_domain_address.c  |   2 +-
>  src/qemu/qemu_hotplug.c         |   5 +-
>  src/qemu/qemu_parse_command.c   |  27 ++--
>  src/vbox/vbox_common.c          |  12 +-
>  src/vmx/vmx.c                   |   2 +-
>  src/vz/vz_sdk.c                 |   6 +-
>  src/xen/xen_driver.c            |   2 +-
>  src/xenapi/xenapi_driver.c      |   2 +-
>  src/xenconfig/xen_common.c      |   2 +-
>  src/xenconfig/xen_sxpr.c        |   8 +-
>  src/xenconfig/xen_xl.c          |   2 +-
>  src/xenconfig/xen_xm.c          |   2 +-
>  19 files changed, 303 insertions(+), 104 deletions(-)

While I agree that having allocation functions which initialize the
internals are necessary in some cases, this patch is a mess as you
squashed everything into one place.

Attachment: signature.asc
Description: Digital signature

--
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