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.
Dave
>From 97199f44caeeeb38e64079c88fb02fcef35eadaa Mon Sep 17 00:00:00 2001
From: David Allan <dallan@xxxxxxxxxx>
Date: Thu, 10 Dec 2009 15:22:20 -0500
Subject: [PATCH 1/1] Add --pool option to vol-path
* Modified vol-path to use the same logic as vol-delete, allowing the syntax:
virsh vol-path --pool testdirpool testvol0
---
tools/virsh.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/virsh.c b/tools/virsh.c
index 94a99e9..7d81c68 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -5275,12 +5275,14 @@ static int
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);
--
1.6.5.2
--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list