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

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

 



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

--
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]