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

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



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


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