[libvirt] [PATCH 6/8] virsh-snapshot: Use the mutually exclusive params macro in cmdSnapshotEdit
Eric Blake
eblake at redhat.com
Thu Mar 21 03:53:20 UTC 2013
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130320/fd537fa2/attachment-0001.sig>
More information about the libvir-list
mailing list