diff options
author | Csaba Henk <csaba@gluster.com> | 2011-07-15 11:44:56 +0200 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2011-09-12 06:21:55 -0700 |
commit | d58382182ee53fcc83ec04f211c000a5a4db9a0b (patch) | |
tree | 63998fe5f7baf96388c27e9634f6726c42195198 | |
parent | 74bf2c1fc5d7377472d8c6ba8e27a333fc618899 (diff) |
cli: reimplement "--version" without excess bloat
Change-Id: I787d241e72b6a6c43db96c220d68fe369bb700a4
BUG: 3242
Reviewed-on: http://review.gluster.com/93
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
-rw-r--r-- | cli/src/cli.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cli/src/cli.c b/cli/src/cli.c index fe533071858..1d500c1abbf 100644 --- a/cli/src/cli.c +++ b/cli/src/cli.c @@ -328,6 +328,11 @@ cli_opt_parse (char *opt, struct cli_state *state) { char *oarg; + if (strcmp (opt, "version") == 0) { + puts (argp_program_version); + exit (0); + } + oarg = strtail (opt, "mode="); if (oarg) { if (strcmp (oarg, "script") == 0) { |