virsh: Adjust domblklist to understand disk volume syntax

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.
This commit is contained in:
John Ferlan 2015-02-26 11:22:17 -05:00
parent 8968c4946c
commit 09aec2a456

View File

@ -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 : "-");