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