提交 94d599ec 编写于 作者: D Dave Allan 提交者: Daniel Veillard

Implement --pool option for virsh vol-path

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
上级 deae2bb5
......@@ -5286,12 +5286,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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册