summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/src/cli-rpc-ops.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c
index 32fc2e0ca9f..b2e919132e3 100644
--- a/cli/src/cli-rpc-ops.c
+++ b/cli/src/cli-rpc-ops.c
@@ -45,6 +45,7 @@
extern rpc_clnt_prog_t *cli_rpc_prog;
extern int cli_op_ret;
+extern int connected;
char *cli_volume_type[] = {"Distribute",
"Stripe",
@@ -1322,6 +1323,9 @@ print_limit_list (char *volname, char *limit_list)
GF_VALIDATE_OR_GOTO ("cli", volname, out);
GF_VALIDATE_OR_GOTO ("cli", limit_list, out);
+ if (!connected)
+ goto out;
+
if (mkdtemp (mountdir) == NULL) {
gf_log ("cli", GF_LOG_WARNING, "failed to create a temporary "
"mount directory");