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