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

Re: [libvirt] [PATCH 6/8] virsh-snapshot: Use the mutually exclusive params macro in cmdSnapshotEdit



On 03/07/2013 05:53 AM, Peter Krempa wrote:
> ---
>  tools/virsh-snapshot.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)

ACK.

> 
> diff --git a/tools/virsh-snapshot.c b/tools/virsh-snapshot.c
> index 78db178..3add7fb 100644
> --- a/tools/virsh-snapshot.c
> +++ b/tools/virsh-snapshot.c
> @@ -584,11 +584,7 @@ cmdSnapshotEdit(vshControl *ctl, const vshCmd *cmd)
>      bool rename_okay = vshCommandOptBool(cmd, "rename");
>      bool clone_okay = vshCommandOptBool(cmd, "clone");
> 
> -    if (rename_okay && clone_okay) {
> -        vshError(ctl, "%s",
> -                 _("--rename and --clone are mutually exclusive"));
> -        return false;
> -    }
> +    VSH_EXCLUSIVE_OPTIONS_EXPR("rename", rename_okay, "clone", clone_okay)
> 
>      if (vshCommandOptBool(cmd, "current") &&
>          vshCommandOptBool(cmd, "snapshotname"))
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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