Re: [libvirt] [PATCH] implement --pool option for virsh vol-path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 11, 2009 at 04:39:31PM -0500, Dave Allan wrote:
> 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);

  Okay, small and makes sense, ACK and pushed,

    thanks !

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@xxxxxxxxxxxx  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]