diff options
Diffstat (limited to 'cli/src/input.c')
| -rw-r--r-- | cli/src/input.c | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/cli/src/input.c b/cli/src/input.c index b9d1d24e6..a8ea46c6d 100644 --- a/cli/src/input.c +++ b/cli/src/input.c @@ -1,22 +1,12 @@ /* - Copyright (c) 2010 Gluster, Inc. <http://www.gluster.com> - This file is part of GlusterFS. - - GlusterFS is free software; you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published - by the Free Software Foundation; either version 3 of the License, - or (at your option) any later version. - - GlusterFS is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see - <http://www.gnu.org/licenses/>. -*/ + Copyright (c) 2010-2012 Red Hat, Inc. <http://www.redhat.com> + This file is part of GlusterFS. + This file is licensed to you under your choice of the GNU Lesser + General Public License, version 3 or any later version (LGPLv3 or + later), or the GNU General Public License, version 2 (GPLv2), in all + cases as published by the Free Software Foundation. +*/ #include <stdio.h> #include <string.h> #include <stdlib.h> @@ -44,7 +34,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; } @@ -71,11 +61,11 @@ cli_input (void *d) if (len > 0 && cmd[len - 1] == '\n') //strip trailing \n cmd[len - 1] = '\0'; ret = cli_cmd_process_line (state, cmd); - if (ret == -1 && state->mode & GLUSTER_MODE_ERR_FATAL) + if (ret != 0 && state->mode & GLUSTER_MODE_ERR_FATAL) break; } - exit (ret); + exit (-ret); return NULL; } |
