FreeCalypso > hg > freecalypso-tools
diff rvinterf/asyncshell/main.c @ 64:d43d82cbfb85
fc-shell: use the newly adopted exit code convention
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 26 Oct 2016 22:25:18 +0000 |
parents | e7502631a0f9 |
children | 84920d3d97c6 |
line wrap: on
line diff
--- a/rvinterf/asyncshell/main.c Wed Oct 26 22:00:39 2016 +0000 +++ b/rvinterf/asyncshell/main.c Wed Oct 26 22:25:18 2016 +0000 @@ -7,6 +7,7 @@ #include <stdio.h> #include <stdlib.h> #include <unistd.h> +#include "exitcodes.h" char *socket_pathname = "/tmp/rvinterf_socket"; char *rvinterf_ttyport; @@ -49,14 +50,14 @@ default: usage: fprintf(stderr, "usage: %s [options] [command]\n", argv[0]); - exit(1); + exit(ERROR_USAGE); } if (rvinterf_ttyport) { if (sopt) { fprintf(stderr, "%s error: -p and -s options are mutually exclusive\n", argv[0]); - exit(1); + exit(ERROR_USAGE); } launch_rvinterf(rvinterf_ttyport); } else { @@ -64,7 +65,7 @@ fprintf(stderr, "%s error: -B, -l and -w options are meaningful only when launching rvinterf\n", argv[0]); - exit(1); + exit(ERROR_USAGE); } connect_local_socket(); } @@ -85,7 +86,7 @@ continue; tty_cleanup(); perror("select"); - exit(1); + exit(ERROR_UNIX); } if (FD_ISSET(0, &fds)) handle_tty_input();