static int help(void) {
- printf("%s [options] [VARIABLE=VALUE...]\n\n"
+ printf("%s [OPTIONS...] [VARIABLE=VALUE...]\n\n"
"Notify the init system about service status updates.\n\n"
" -h --help Show this help\n"
" --ready Inform the init system about service start-up completion\n"
}
}
+ if (optind >= argc &&
+ !arg_ready &&
+ !arg_status &&
+ !arg_pid &&
+ !arg_booted) {
+ help();
+ return -EINVAL;
+ }
+
return 1;
}