[libvirt] [PATCH 1/2] virsh: Adjust domblklist to understand disk volume syntax

John Ferlan jferlan at redhat.com
Thu Feb 26 21:59:02 UTC 2015


A disk using a source pool is listed as having a source '-' in domblklist
because it doesn't check the right XML syntax to find the source.

Add a check for "./source/volume" which is where the "path" (of sorts)
to the volume name is described.

Signed-off-by: John Ferlan <jferlan at redhat.com>
---
 tools/virsh-domain-monitor.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c
index 925eb1b..3c16b3e 100644
--- a/tools/virsh-domain-monitor.c
+++ b/tools/virsh-domain-monitor.c
@@ -531,7 +531,8 @@ cmdDomblklist(vshControl *ctl, const vshCmd *cmd)
         source = virXPathString("string(./source/@file"
                                 "|./source/@dev"
                                 "|./source/@dir"
-                                "|./source/@name)", ctxt);
+                                "|./source/@name"
+                                "|./source/@volume)", ctxt);
         if (details) {
             vshPrint(ctl, "%-10s %-10s %-10s %s\n", type, device,
                      target, source ? source : "-");
-- 
2.1.0




More information about the libvir-list mailing list