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