[libvirt] [PATCH v3 10/14] virsh: Create macros for common "vol" options

Andrea Bolognani abologna at redhat.com
Mon Jan 11 15:21:29 UTC 2016


On Sat, 2016-01-09 at 08:36 -0500, John Ferlan wrote:
> Rather than continually cut-n-paste the strings into each command,
> create common macros to be used generically.  Replace the more commonly
> used "vol" option with a macro. This also adjusts 2 commands that
> didn't have the correct helpstr - 'vol-create-from' and 'vol-clone'.
> Both are described in the man page as taking vol, path, or key and
> the code uses the virshCommandOptVol instead of virshCommandOptVolBy.
> 
> Signed-off-by: John Ferlan <jferlan at redhat.com>
> ---
>  tools/virsh-volume.c | 61 ++++++++++++++--------------------------------------
>  1 file changed, 16 insertions(+), 45 deletions(-)

I'm a bit conflicted about the macro name - I could maybe see
VIRSH_COMMON_OPT_VOLUME as an alternative, but even that would not
be completely satisfactory.

I guess there's no clear winner in this kind of situation, so let's
not worry too much about it. We can always change it whenever :)

ACK.

-- 
Andrea Bolognani
Software Engineer - Virtualization Team




More information about the libvir-list mailing list