diff rvinterf/asyncshell/oneshot.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 bbc41034f14c
line wrap: on
line diff
--- a/rvinterf/asyncshell/oneshot.c	Wed Oct 26 22:00:39 2016 +0000
+++ b/rvinterf/asyncshell/oneshot.c	Wed Oct 26 22:25:18 2016 +0000
@@ -7,6 +7,7 @@
 #include <strings.h>
 #include <stdlib.h>
 #include "limits.h"
+#include "exitcodes.h"
 
 extern int cmd_poweroff();
 extern int cmd_send_oneshot();
@@ -40,15 +41,15 @@
 		fprintf(stderr,
 			"error: \"%s\" is not a valid one-shot command\n",
 			argv[0]);
-		exit(1);
+		exit(ERROR_USAGE);
 	}
 	if (argc - 1 > tp->maxargs) {
 		fprintf(stderr, "%s: too many arguments\n", tp->cmd);
-		exit(1);
+		exit(ERROR_USAGE);
 	}
 	if (argc - 1 < tp->minargs) {
 		fprintf(stderr, "%s: too few arguments\n", tp->cmd);
-		exit(1);
+		exit(ERROR_USAGE);
 	}
 	return tp->func(argc, argv);
 }