mirror of
https://github.com/troglobit/finit.git
synced 2026-10-10 16:52:39 +07:00
Fix #294: shutdown --help mistakenly shuts down system
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
+3
-3
@@ -103,7 +103,7 @@ static int usage(int rc)
|
||||
{
|
||||
fprintf(stderr, "Usage: %s [OPTIONS]\n\n"
|
||||
"Options:\n"
|
||||
" --help This help text\n"
|
||||
" -?, --help This help text\n"
|
||||
" -f, --force Force unsafe %s now, do not contact the init system.\n"
|
||||
" --halt Halt system, regardless of how the command is called.\n"
|
||||
" -h Halt or power off after shutdown.\n"
|
||||
@@ -116,15 +116,15 @@ static int usage(int rc)
|
||||
|
||||
int reboot_main(int argc, char *argv[])
|
||||
{
|
||||
int c, force = 0;
|
||||
struct option long_options[] = {
|
||||
{"help", 0, NULL, 'h'},
|
||||
{"help", 0, NULL, '?'},
|
||||
{"force", 0, NULL, 'f'},
|
||||
{"halt", 0, NULL, 'H'},
|
||||
{"poweroff", 0, NULL, 'p'},
|
||||
{"reboot", 0, NULL, 'r'},
|
||||
{NULL, 0, NULL, 0}
|
||||
};
|
||||
int c, force = 0;
|
||||
|
||||
/* Initial command taken from program name */
|
||||
transform(prognm);
|
||||
|
||||
Reference in New Issue
Block a user