aboutsummaryrefslogtreecommitdiff
path: root/servicecmd/enable.c
diff options
context:
space:
mode:
Diffstat (limited to 'servicecmd/enable.c')
-rw-r--r--servicecmd/enable.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/servicecmd/enable.c b/servicecmd/enable.c
index 73ea01e..5d4195e 100644
--- a/servicecmd/enable.c
+++ b/servicecmd/enable.c
@@ -31,18 +31,15 @@ static int cmd_enable(int argc, char **argv)
int ret = EXIT_FAILURE;
struct stat sb;
- if (argc < 2 || argc > 3) {
- fputs("Wrong number of arguments for `enable'.\n"
- "Try `service help enable' for more information.\n",
- stderr);
+ if (check_arguments(argv[0], argc, 2, 3))
return EXIT_FAILURE;
- }
for (ptr = argv[1]; isalnum(*ptr) || *ptr == '_'; ++ptr)
;
if (*ptr != '\0') {
fprintf(stderr, "Invalid service name '%s'\n", argv[1]);
+ tell_read_help(argv[0]);
return EXIT_FAILURE;
}