On Mon, Jun 02, 2014 at 04:08:51PM +0200, Timm Bäder wrote: > --- > libvirt-gobject/libvirt-gobject-domain-snapshot.c | 29 +++++++++++++++++++++++ > libvirt-gobject/libvirt-gobject-domain-snapshot.h | 16 +++++++++++++ > libvirt-gobject/libvirt-gobject.sym | 6 +++++ > 3 files changed, 51 insertions(+) > > diff --git a/libvirt-gobject/libvirt-gobject-domain-snapshot.c b/libvirt-gobject/libvirt-gobject-domain-snapshot.c > index fcf70ed..f835b58 100644 > --- a/libvirt-gobject/libvirt-gobject-domain-snapshot.c > +++ b/libvirt-gobject/libvirt-gobject-domain-snapshot.c > @@ -205,3 +205,32 @@ 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 > + * > + * Returns: TRUE on success, FALSE otherwise > + */ > +gboolean gvir_domain_snapshot_delete (GVirDomainSnapshot *snapshot, > + guint flags, > + GError **error) > +{ > + GVirDomainSnapshotPrivate *priv; > + int status; > + > + g_return_if_fail(GVIR_IS_DOMAIN_SNAPSHOT (snapshot)); > + g_return_if_fail(error == NULL || *error == NULL); This needs to be changed to g_return_val_if_fail > index f2419ac..232e63b 100644 > --- a/libvirt-gobject/libvirt-gobject.sym > +++ b/libvirt-gobject/libvirt-gobject.sym > @@ -234,4 +234,10 @@ LIBVIRT_GOBJECT_0.1.5 { > gvir_connection_open_read_only_finish; > } LIBVIRT_GOBJECT_0.1.4; > > +LIBVIRT_GOBJECT_0.1.9 { > + global: > + gvir_domain_snapshot_delete_flags_get_type; > + gvir_domain_snapshot_delete; > +} LIBVIRT_GOBJECT_0.1.5; And this does not match the indentation of the rest of the file, I'll amend the commit with the diff below and push libvirt-gobject/libvirt-gobject-domain-snapshot.c | 4 ++-- libvirt-gobject/libvirt-gobject.sym | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libvirt-gobject/libvirt-gobject-domain-snapshot.c b/libvirt-gobject/libvirt-gobject-domain-snapshot.c index 7dd157c..7bb89f1 100644 --- a/libvirt-gobject/libvirt-gobject-domain-snapshot.c +++ b/libvirt-gobject/libvirt-gobject-domain-snapshot.c @@ -222,8 +222,8 @@ gboolean gvir_domain_snapshot_delete (GVirDomainSnapshot *snapshot, GVirDomainSnapshotPrivate *priv; int status; - g_return_if_fail(GVIR_IS_DOMAIN_SNAPSHOT (snapshot)); - g_return_if_fail(error == NULL || *error == NULL); + g_return_val_if_fail(GVIR_IS_DOMAIN_SNAPSHOT (snapshot), FALSE); + g_return_val_if_fail(error == NULL || *error == NULL, FALSE); priv = snapshot->priv; status = virDomainSnapshotDelete(priv->handle, flags); diff --git a/libvirt-gobject/libvirt-gobject.sym b/libvirt-gobject/libvirt-gobject.sym index 232e63b..0fa8bfb 100644 --- a/libvirt-gobject/libvirt-gobject.sym +++ b/libvirt-gobject/libvirt-gobject.sym @@ -236,8 +236,8 @@ LIBVIRT_GOBJECT_0.1.5 { LIBVIRT_GOBJECT_0.1.9 { global: - gvir_domain_snapshot_delete_flags_get_type; - gvir_domain_snapshot_delete; + gvir_domain_snapshot_delete_flags_get_type; + gvir_domain_snapshot_delete; } LIBVIRT_GOBJECT_0.1.5; # .... define new API here using predicted next version number .... -- 1.9.3 Christophe
Attachment:
pgpXQBQJNUity.pgp
Description: PGP signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list