[libvirt] [PATCH 3/7] snapshot: Refactor virDomainSnapshotDefFormat

Eric Blake eblake at redhat.com
Thu Feb 21 15:53:14 UTC 2019


On 2/20/19 9:53 AM, Eric Blake wrote:
> Split out an internal helper that produces format into a
> virBuffer, similar to what domain_conf.c does, and making
> the next patch easier to write.
> 
> Signed-off-by: Eric Blake <eblake at redhat.com>
> ---
>  src/conf/snapshot_conf.c | 103 ++++++++++++++++++++++-----------------
>  1 file changed, 59 insertions(+), 44 deletions(-)
> 
> diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c
> index b8012cb111..b7b5873cbe 100644
> --- a/src/conf/snapshot_conf.c
> +++ b/src/conf/snapshot_conf.c
> @@ -700,92 +700,107 @@ virDomainSnapshotDiskDefFormat(virBufferPtr buf,
>  }
> 
> 
> -char *
> -virDomainSnapshotDefFormat(const char *domain_uuid,
> -                           virDomainSnapshotDefPtr def,
> -                           virCapsPtr caps,
> -                           virDomainXMLOptionPtr xmlopt,
> -                           unsigned int flags)
> +static int
> +virDomainSnapshotDefFormatInternal(virBufferPtr buf,
> +                                   const char *domain_uuid,

This should really be named uuidstr, especially once I push my trivial
patch that favors the correct naming.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org




More information about the libvir-list mailing list