74b1de
From ec707e099d4e4338d1ea21560d367b02e6339532 Mon Sep 17 00:00:00 2001
74b1de
From: Sunil Kumar Acharya <sheggodu@redhat.com>
74b1de
Date: Mon, 1 Apr 2019 16:16:47 +0530
74b1de
Subject: [PATCH 39/52] cli: fix query to user during brick-mux selection
74b1de
74b1de
Label: DOWNSTREAM ONLY
74b1de
74b1de
Change-Id: I59472066b917ea2b23de72bcd91dc3e275d5e055
74b1de
Signed-off-by: Sunil Kumar Acharya <sheggodu@redhat.com>
74b1de
---
74b1de
 cli/src/cli-cmd-parser.c | 33 +++++++++++++++++----------------
74b1de
 1 file changed, 17 insertions(+), 16 deletions(-)
74b1de
74b1de
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c
74b1de
index 541dc62..d9ccba1 100644
74b1de
--- a/cli/src/cli-cmd-parser.c
74b1de
+++ b/cli/src/cli-cmd-parser.c
74b1de
@@ -1693,23 +1693,24 @@ cli_cmd_volume_set_parse(struct cli_state *state, const char **words,
74b1de
                 goto out;
74b1de
             }
74b1de
         }
74b1de
-    }
74b1de
-
74b1de
-    if ((strcmp (key, "cluster.brick-multiplex") == 0)) {
74b1de
-        question = "Brick-multiplexing is supported only for "
74b1de
-                   "OCS converged or independent mode. Also it is "
74b1de
-                   "advised to make sure that either all "
74b1de
-                   "volumes are in stopped state or no bricks "
74b1de
-                   "are running before this option is modified."
74b1de
-                   "Do you still want to continue?";
74b1de
 
74b1de
-        answer = cli_cmd_get_confirmation (state, question);
74b1de
-        if (GF_ANSWER_NO == answer) {
74b1de
-            gf_log ("cli", GF_LOG_ERROR, "Operation "
74b1de
-                    "cancelled, exiting");
74b1de
-            *op_errstr = gf_strdup ("Aborted by user.");
74b1de
-            ret = -1;
74b1de
-            goto out;
74b1de
+        if ((strcmp (key, "cluster.brick-multiplex") == 0)) {
74b1de
+            question =
74b1de
+                "Brick-multiplexing is supported only for "
74b1de
+                "OCS converged or independent mode. Also it is "
74b1de
+                "advised to make sure that either all "
74b1de
+                "volumes are in stopped state or no bricks "
74b1de
+                "are running before this option is modified."
74b1de
+                "Do you still want to continue?";
74b1de
+
74b1de
+            answer = cli_cmd_get_confirmation (state, question);
74b1de
+            if (GF_ANSWER_NO == answer) {
74b1de
+                gf_log ("cli", GF_LOG_ERROR, "Operation "
74b1de
+                        "cancelled, exiting");
74b1de
+                *op_errstr = gf_strdup ("Aborted by user.");
74b1de
+                ret = -1;
74b1de
+                goto out;
74b1de
+            }
74b1de
         }
74b1de
     }
74b1de
 
74b1de
-- 
74b1de
1.8.3.1
74b1de