Re: [PATCH v3 07/18] domain: Add struct for future domain format parameters

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

 




On 3/4/19 10:34 PM, Eric Blake wrote:
> Upcoming patches will add new flags for increasing the amount of
> information present in <domain> dumpxml, but where the source
> of that information is tied to somewhere other than the active
> or offline domain sub-definition.  Make those extensions easier
> by updating internal callers to pass in a struct, rather than
> adding new parameters for each extension, so that later patches
> only have to patch callers that care about a new member of the
> struct rather than all callers.
> 
> I considered updating virDomainDefFormat(), but as there were
> so many existing callers, it was easier to just add a new
> wrapper function virDomainDefFormatFull() which takes the full
> struct, while making the existing interface forward on to the
> full one.
> 
> Since all callers are being adjusted anyway, reorder the
> parameters of virDomainDefFormatInternal to put buf first, as
> that tends to be more typical.
> 
> Signed-off-by: Eric Blake <eblake@xxxxxxxxxx>
> ---
>  src/conf/domain_conf.h      | 18 ++++++++++++++----
>  src/conf/domain_conf.c      | 33 ++++++++++++++++++++++++++-------
>  src/conf/snapshot_conf.c    |  5 ++++-
>  src/network/bridge_driver.c |  2 +-
>  src/qemu/qemu_domain.c      | 12 ++++++------
>  5 files changed, 51 insertions(+), 19 deletions(-)
> 

The structure formatting of _virDomainDefFormatData and friends is a bit
non-standard from what is typically done, but not incorrect.

Reviewed-by: John Ferlan <jferlan@xxxxxxxxxx>

John

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