From 632fdcaac9114282ecdaf1a88e3740565fda41c8 Mon Sep 17 00:00:00 2001 From: Csaba Henk Date: Thu, 6 Sep 2012 17:52:11 +0200 Subject: 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 Reviewed-on: http://review.gluster.org/3913 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- cli/src/input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cli') 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; } -- cgit