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

 



---
 tools/virsh-snapshot.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

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"))
-- 
1.8.1.1

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