[libvirt-glib 2/3] Handle failure of virDomainIsPersistent() correctly

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

 



From: "Zeeshan Ali (Khattak)" <zeeshanak@xxxxxxxxx>

virDomainIsPersistent() failing most probably means that domain is no
longer available so flaging it as transient isn't exactly wrong.
---
 libvirt-gobject/libvirt-gobject-domain.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libvirt-gobject/libvirt-gobject-domain.c b/libvirt-gobject/libvirt-gobject-domain.c
index 2bc12d9..c1a67a5 100644
--- a/libvirt-gobject/libvirt-gobject-domain.c
+++ b/libvirt-gobject/libvirt-gobject-domain.c
@@ -844,5 +844,5 @@ gboolean gvir_domain_get_persistent(GVirDomain *dom)
 {
     g_return_val_if_fail(GVIR_IS_DOMAIN(dom), FALSE);
 
-    return virDomainIsPersistent(dom->priv->handle);
+    return virDomainIsPersistent(dom->priv->handle) == 1;
 }
-- 
1.7.7.5

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