diff rvinterf/tmsh/main.c @ 65:21a79f465d6a

fc-tmsh: use the newly adopted exit code convention
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 26 Oct 2016 22:46:23 +0000
parents e7502631a0f9
children 2c6dca514a20
line wrap: on
line diff
--- a/rvinterf/tmsh/main.c	Wed Oct 26 22:25:18 2016 +0000
+++ b/rvinterf/tmsh/main.c	Wed Oct 26 22:46:23 2016 +0000
@@ -7,6 +7,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
+#include "exitcodes.h"
 
 char *socket_pathname = "/tmp/rvinterf_socket";
 int ttyhacks, dflag;
@@ -44,7 +45,7 @@
 		default:
 usage:			fprintf(stderr,
 				"usage: %s [options] [ttyport]\n", argv[0]);
-			exit(1);
+			exit(ERROR_USAGE);
 		}
 	switch (argc - optind) {
 	case 0:
@@ -52,7 +53,7 @@
 			fprintf(stderr,
       "%s: -B, -l and -w options are meaningful only when launching rvinterf\n",
 				argv[0]);
-			exit(1);
+			exit(ERROR_USAGE);
 		}
 		break;
 	case 1:
@@ -75,7 +76,7 @@
 				continue;
 			tty_cleanup();
 			perror("select");
-			exit(1);
+			exit(ERROR_UNIX);
 		}
 		if (FD_ISSET(0, &fds))
 			handle_tty_input();