summaryrefslogtreecommitdiffstats
path: root/cli/src/input.c
diff options
context:
space:
mode:
authorCsaba Henk <csaba@redhat.com>2012-09-06 17:52:11 +0200
committerAnand Avati <avati@redhat.com>2012-09-06 12:18:08 -0700
commit632fdcaac9114282ecdaf1a88e3740565fda41c8 (patch)
treedcee72ad6abbe9fc3bd1e6b9bceb1d95144306b3 /cli/src/input.c
parentcfbe7823b238171c0e63fa88c894f4a065ee7abd (diff)
cli: sanitize exit value
The pattern established in http://review.gluster.com/3218 as of which cli exits with negated return value of the command instrumentation function should be uniformly followed. (Prior to this commit whether cli exits with 255 or 1 on failure depended on the way of invocation.) Change-Id: Icbab1f435042b3321c689fa785109bf87195d86d BUG: 765214 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.org/3913 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'cli/src/input.c')
-rw-r--r--cli/src/input.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/src/input.c b/cli/src/input.c
index af769416056..c80a70b4e82 100644
--- a/cli/src/input.c
+++ b/cli/src/input.c
@@ -35,7 +35,7 @@ cli_batch (void *d)
ret = cli_cmd_process (state, state->argc, state->argv);
gf_log ("", GF_LOG_INFO, "Exiting with: %d", ret);
- exit (ret);
+ exit (-ret);
return NULL;
}