[PATCH] virsh-snapshot: Fix xpath query to determine snapshot state

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

 



The query didn't match the external state correctly for offline internal
snapshots.
---
 tools/virsh-snapshot.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/virsh-snapshot.c b/tools/virsh-snapshot.c
index ba57059..66776e2 100644
--- a/tools/virsh-snapshot.c
+++ b/tools/virsh-snapshot.c
@@ -983,8 +983,8 @@ cmdSnapshotInfo(vshControl *ctl, const vshCmd *cmd)
      * external snapshot.  */
     switch (virXPathBoolean("boolean(/domainsnapshot/memory)", ctxt)) {
     case 1:
-        external = virXPathBoolean("boolean(/domainsnapshot/memory/@snapshot=external "
-                                   "| /domainsnapshot/disks/disk/@snapshot=external)",
+        external = virXPathBoolean("boolean(/domainsnapshot/memory[@snapshot='external'] "
+                                   "| /domainsnapshot/disks/disk[@snapshot='external'])",
                                    ctxt);
         break;
     case 0:
-- 
1.8.1.1

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