[libvirt] [libvirt-glib] [PATCH v2] GVirDomainSnapshot: Add gvir_domain_snapshot_delete
Christophe Fergeau
cfergeau at redhat.com
Mon Jun 2 11:32:25 UTC 2014
Hey,
On Sun, Jun 01, 2014 at 11:16:47AM +0200, Timm Bäder wrote:
> ---
>
> Whoops, totally forgot about the delete flags in the first version,
> sorry.
>
> As for the underline in domain_snapshot, I took that from
> gvir_domain_snapshot_get_config so I don't really know what's the
> correct version.
>
> Since this is using gvir_domain_snapshot_get_name now, the patch
> removing the #if 0's in libvirt-gobject-domain-snapshot.c is needed.
>
> libvirt-gobject/libvirt-gobject-domain-snapshot.c | 25 +++++++++++++++++++++++
> libvirt-gobject/libvirt-gobject-domain-snapshot.h | 16 +++++++++++++++
> libvirt-gobject/libvirt-gobject.sym | 6 ++++++
> 3 files changed, 47 insertions(+)
>
> diff --git a/libvirt-gobject/libvirt-gobject-domain-snapshot.c b/libvirt-gobject/libvirt-gobject-domain-snapshot.c
> index fcf70ed..aa0504d 100644
> --- a/libvirt-gobject/libvirt-gobject-domain-snapshot.c
> +++ b/libvirt-gobject/libvirt-gobject-domain-snapshot.c
> @@ -205,3 +205,28 @@ GVirConfigDomainSnapshot *gvir_domain_snapshot_get_config
> free(xml);
> return conf;
> }
> +
> +/**
> + * gvir_domain_snapshot_delete:
> + * @snapshot: the domain snapshot
> + * @flags: Bitwise or of #GVirDomainSnapshotDeleteFlags
> + * @error: (allow-none): Place-holder for error or NULL
> + */
> +void gvir_domain_snapshot_delete (GVirDomainSnapshot *snapshot,
> + GVirDomainSnapshotDeleteFlags flags,
This is inconsistent with how it's declared in the .h file (guint flags
over there). I'd favour the 'guint flags' version
> + GError **error)
Functions taking a GError ** arg generally also return a gboolean
indicating success/failure.
Looks good otherwise.
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140602/88bae412/attachment-0001.sig>
More information about the libvir-list
mailing list