This patch fixes the problem reported in:
https://bugzilla.redhat.com/show_bug.cgi?id=509306
The bug reporter says that vol-delete does not support the --pool
option, but that's not the case in the current head. This patch makes
vol-path behave the same way as vol-delete
* tools/virsh.c: Modified vol-path to use the same logic as vol-delete,
allowing the syntax: virsh vol-path --pool testdirpool testvol0
cmdVolPath(vshControl *ctl, const vshCmd *cmd)
{
virStorageVolPtr vol;
+ char *name = NULL;
if (!vshConnectionUsability(ctl, ctl->conn, TRUE))
return FALSE;
- if (!(vol = vshCommandOptVolBy(ctl, cmd, "vol", "pool", NULL,
- VSH_BYUUID)))
+
+ if (!(vol = vshCommandOptVol(ctl, cmd, "vol", "pool", &name))) {
return FALSE;
+ }
vshPrint(ctl, "%s\n", virStorageVolGetPath(vol));
virStorageVolFree(vol);