summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
authorAvra Sengupta <asengupt@redhat.com>2013-01-24 11:39:48 +0530
committerAnand Avati <avati@redhat.com>2013-01-29 15:27:29 -0800
commitb8d5fd2b88db7e18a10e57a0edf1a41eda4f5314 (patch)
tree7fb29a1060e0fc802f81473114117aabec4db507 /cli
parent326a47939dabff218205ca2959b9701e2e0ce47c (diff)
glusterfs : Moved option files, and statedumps from /tmp
Change-Id: Ibdede396c4d6859225937316b7a59a661bcaf9f5 BUG: 764890 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/4422 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'cli')
-rw-r--r--cli/src/cli.c5
-rw-r--r--cli/src/cli.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/cli/src/cli.c b/cli/src/cli.c
index 4ff17280597..082ba67c0e2 100644
--- a/cli/src/cli.c
+++ b/cli/src/cli.c
@@ -307,6 +307,11 @@ cli_opt_parse (char *opt, struct cli_state *state)
exit (0);
}
+ if (strcmp (opt, "print-statedumpdir") == 0) {
+ cli_out ("%s", DEFAULT_VAR_RUN_DIRECTORY);
+ exit (0);
+ }
+
if (strcmp (opt, "xml") == 0) {
#if (HAVE_LIB_XML)
state->mode |= GLUSTER_MODE_XML;
diff --git a/cli/src/cli.h b/cli/src/cli.h
index 62216397ff7..e0699b4293f 100644
--- a/cli/src/cli.h
+++ b/cli/src/cli.h
@@ -33,6 +33,7 @@
#define CLI_TOP_CMD_TIMEOUT 600 //Longer timeout for volume top
#define DEFAULT_CLI_LOG_FILE_DIRECTORY DATADIR "/log/glusterfs"
#define DEFAULT_LOG_FILE_DIRECTORY DATADIR "/log/glusterfs"
+#define DEFAULT_VAR_RUN_DIRECTORY DATADIR "/run/gluster"
#define CLI_VOL_STATUS_BRICK_LEN 55
#define CLI_TAB_LENGTH 8
#define CLI_BRICK_STATUS_LINE_LEN 78