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

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

 



On Fri, Feb 08, 2013 at 14:26:28 +0100, Peter Krempa wrote:
> 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:

ACK, I wonder what did the old XPath actually do :-)

Jirka

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