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