mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
virsh-snapshot: Fix XPath query to determine snapshot state
The query didn't match the external state correctly for offline internal snapshots.
This commit is contained in:
@@ -983,8 +983,8 @@ cmdSnapshotInfo(vshControl *ctl, const vshCmd *cmd)
|
|||||||
* external snapshot. */
|
* external snapshot. */
|
||||||
switch (virXPathBoolean("boolean(/domainsnapshot/memory)", ctxt)) {
|
switch (virXPathBoolean("boolean(/domainsnapshot/memory)", ctxt)) {
|
||||||
case 1:
|
case 1:
|
||||||
external = virXPathBoolean("boolean(/domainsnapshot/memory/@snapshot=external "
|
external = virXPathBoolean("boolean(/domainsnapshot/memory[@snapshot='external'] "
|
||||||
"| /domainsnapshot/disks/disk/@snapshot=external)",
|
"| /domainsnapshot/disks/disk[@snapshot='external'])",
|
||||||
ctxt);
|
ctxt);
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
|
|||||||
Reference in New Issue
Block a user