diff --git a/tools/virsh.c b/tools/virsh.c index 9c9cd1ed11..65525d439e 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -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);