diff options
Diffstat (limited to 'cli')
-rw-r--r-- | cli/src/cli-cmd-volume.c | 10 | ||||
-rw-r--r-- | cli/src/cli.c | 5 | ||||
-rw-r--r-- | cli/src/cli.h | 9 |
3 files changed, 20 insertions, 4 deletions
diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c index 61b6b2090a9..41995791cdd 100644 --- a/cli/src/cli-cmd-volume.c +++ b/cli/src/cli-cmd-volume.c @@ -2087,6 +2087,7 @@ cli_cmd_volume_reset_brick_cbk (struct cli_state *state, if (!frame) goto out; + ret = cli_cmd_volume_reset_brick_parse (words, wordcount, &options); if (ret) { @@ -2095,6 +2096,15 @@ cli_cmd_volume_reset_brick_cbk (struct cli_state *state, goto out; } + if (state->mode & GLUSTER_MODE_WIGNORE_PARTITION) { + ret = dict_set_int32 (options, "ignore-partition", _gf_true); + if (ret) { + gf_log ("cli", GF_LOG_ERROR, "Failed to set ignore-" + "partition option"); + goto out; + } + } + CLI_LOCAL_INIT (local, words, frame, options); if (proc->fn) { diff --git a/cli/src/cli.c b/cli/src/cli.c index 574ee0eea33..cd016514cab 100644 --- a/cli/src/cli.c +++ b/cli/src/cli.c @@ -348,6 +348,11 @@ cli_opt_parse (char *opt, struct cli_state *state) return 0; } + if (strcmp (opt, "wignore-partition") == 0) { + state->mode |= GLUSTER_MODE_WIGNORE_PARTITION; + return 0; + } + if (strcmp (opt, "wignore") == 0) { state->mode |= GLUSTER_MODE_WIGNORE; return 0; diff --git a/cli/src/cli.h b/cli/src/cli.h index 60492c1b9fc..1e92d675199 100644 --- a/cli/src/cli.h +++ b/cli/src/cli.h @@ -56,10 +56,11 @@ typedef enum { MAX } values; -#define GLUSTER_MODE_SCRIPT (1 << 0) -#define GLUSTER_MODE_ERR_FATAL (1 << 1) -#define GLUSTER_MODE_XML (1 << 2) -#define GLUSTER_MODE_WIGNORE (1 << 3) +#define GLUSTER_MODE_SCRIPT (1 << 0) +#define GLUSTER_MODE_ERR_FATAL (1 << 1) +#define GLUSTER_MODE_XML (1 << 2) +#define GLUSTER_MODE_WIGNORE (1 << 3) +#define GLUSTER_MODE_WIGNORE_PARTITION (1 << 4) #define GLUSTERD_GET_QUOTA_LIST_MOUNT_PATH(abspath, volname, path) do { \ |