diff options
author | Eric Andersen <andersen@codepoet.org> | 2004-03-15 08:29:22 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2004-03-15 08:29:22 +0000 |
commit | c7bda1ce659294d6e22c06e087f6f265983c7578 (patch) | |
tree | 4c6d2217f4d8306c59cf1096f8664e1cfd167213 /init/init.c | |
parent | 8854004b41065b3d081af7f3df13a100b0c8bfbe (diff) | |
download | busybox-w32-c7bda1ce659294d6e22c06e087f6f265983c7578.tar.gz busybox-w32-c7bda1ce659294d6e22c06e087f6f265983c7578.tar.bz2 busybox-w32-c7bda1ce659294d6e22c06e087f6f265983c7578.zip |
Remove trailing whitespace. Update copyright to include 2004.
Diffstat (limited to 'init/init.c')
-rw-r--r-- | init/init.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/init/init.c b/init/init.c index d332ccdbe..159b53912 100644 --- a/init/init.c +++ b/init/init.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * Mini init implementation for busybox | 3 | * Mini init implementation for busybox |
4 | * | 4 | * |
5 | * Copyright (C) 1995, 1996 by Bruce Perens <bruce@pixar.com>. | 5 | * Copyright (C) 1995, 1996 by Bruce Perens <bruce@pixar.com>. |
6 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 6 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
7 | * Adjusted by so many folks, it's impossible to keep track. | 7 | * Adjusted by so many folks, it's impossible to keep track. |
8 | * | 8 | * |
9 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
@@ -22,7 +22,7 @@ | |||
22 | * | 22 | * |
23 | */ | 23 | */ |
24 | 24 | ||
25 | /* Turn this on to disable all the dangerous | 25 | /* Turn this on to disable all the dangerous |
26 | rebooting stuff when debugging. | 26 | rebooting stuff when debugging. |
27 | #define DEBUG_INIT | 27 | #define DEBUG_INIT |
28 | */ | 28 | */ |
@@ -97,7 +97,7 @@ struct serial_struct { | |||
97 | 97 | ||
98 | #if defined CONFIG_FEATURE_INIT_COREDUMPS | 98 | #if defined CONFIG_FEATURE_INIT_COREDUMPS |
99 | /* | 99 | /* |
100 | * When a file named CORE_ENABLE_FLAG_FILE exists, setrlimit is called | 100 | * When a file named CORE_ENABLE_FLAG_FILE exists, setrlimit is called |
101 | * before processes are spawned to set core file size as unlimited. | 101 | * before processes are spawned to set core file size as unlimited. |
102 | * This is for debugging only. Don't use this is production, unless | 102 | * This is for debugging only. Don't use this is production, unless |
103 | * you want core dumps lying about.... | 103 | * you want core dumps lying about.... |
@@ -351,7 +351,7 @@ static void console_init(void) | |||
351 | if ((s = getenv("CONSOLE")) != NULL || (s = getenv("console")) != NULL) { | 351 | if ((s = getenv("CONSOLE")) != NULL || (s = getenv("console")) != NULL) { |
352 | safe_strncpy(console, s, sizeof(console)); | 352 | safe_strncpy(console, s, sizeof(console)); |
353 | #if #cpu(sparc) | 353 | #if #cpu(sparc) |
354 | /* sparc kernel supports console=tty[ab] parameter which is also | 354 | /* sparc kernel supports console=tty[ab] parameter which is also |
355 | * passed to init, so catch it here */ | 355 | * passed to init, so catch it here */ |
356 | /* remap tty[ab] to /dev/ttyS[01] */ | 356 | /* remap tty[ab] to /dev/ttyS[01] */ |
357 | if (strcmp(s, "ttya") == 0) | 357 | if (strcmp(s, "ttya") == 0) |
@@ -555,8 +555,8 @@ static pid_t run(const struct init_action *a) | |||
555 | 555 | ||
556 | /* | 556 | /* |
557 | Interactive shells want to see a dash in argv[0]. This | 557 | Interactive shells want to see a dash in argv[0]. This |
558 | typically is handled by login, argv will be setup this | 558 | typically is handled by login, argv will be setup this |
559 | way if a dash appears at the front of the command path | 559 | way if a dash appears at the front of the command path |
560 | (like "-/bin/sh"). | 560 | (like "-/bin/sh"). |
561 | */ | 561 | */ |
562 | 562 | ||
@@ -585,7 +585,7 @@ static pid_t run(const struct init_action *a) | |||
585 | * before the user wants it. This is critical if swap is not | 585 | * before the user wants it. This is critical if swap is not |
586 | * enabled and the system has low memory. Generally this will | 586 | * enabled and the system has low memory. Generally this will |
587 | * be run on the second virtual console, and the first will | 587 | * be run on the second virtual console, and the first will |
588 | * be allowed to start a shell or whatever an init script | 588 | * be allowed to start a shell or whatever an init script |
589 | * specifies. | 589 | * specifies. |
590 | */ | 590 | */ |
591 | messageD(LOG, "Waiting for enter to start '%s'" | 591 | messageD(LOG, "Waiting for enter to start '%s'" |
@@ -610,7 +610,7 @@ static pid_t run(const struct init_action *a) | |||
610 | } | 610 | } |
611 | #endif | 611 | #endif |
612 | 612 | ||
613 | /* Now run it. The new program will take over this PID, | 613 | /* Now run it. The new program will take over this PID, |
614 | * so nothing further in init.c should be run. */ | 614 | * so nothing further in init.c should be run. */ |
615 | execv(cmdpath, cmd); | 615 | execv(cmdpath, cmd); |
616 | 616 | ||
@@ -672,7 +672,7 @@ static void init_reboot(unsigned long magic) | |||
672 | { | 672 | { |
673 | pid_t pid; | 673 | pid_t pid; |
674 | /* We have to fork here, since the kernel calls do_exit(0) in | 674 | /* We have to fork here, since the kernel calls do_exit(0) in |
675 | * linux/kernel/sys.c, which can cause the machine to panic when | 675 | * linux/kernel/sys.c, which can cause the machine to panic when |
676 | * the init process is killed.... */ | 676 | * the init process is killed.... */ |
677 | if ((pid = fork()) == 0) { | 677 | if ((pid = fork()) == 0) { |
678 | reboot(magic); | 678 | reboot(magic); |
@@ -866,7 +866,7 @@ static void new_init_action(int action, const char *command, const char *cons) | |||
866 | /* Append to the end of the list */ | 866 | /* Append to the end of the list */ |
867 | for (a = init_action_list; a && a->next; a = a->next) { | 867 | for (a = init_action_list; a && a->next; a = a->next) { |
868 | /* don't enter action if it's already in the list */ | 868 | /* don't enter action if it's already in the list */ |
869 | if ((strcmp(a->command, command) == 0) && | 869 | if ((strcmp(a->command, command) == 0) && |
870 | (strcmp(a->terminal, cons) ==0)) { | 870 | (strcmp(a->terminal, cons) ==0)) { |
871 | free(new_action); | 871 | free(new_action); |
872 | return; | 872 | return; |
@@ -934,9 +934,9 @@ static void check_memory(void) | |||
934 | 934 | ||
935 | /* NOTE that if CONFIG_FEATURE_USE_INITTAB is NOT defined, | 935 | /* NOTE that if CONFIG_FEATURE_USE_INITTAB is NOT defined, |
936 | * then parse_inittab() simply adds in some default | 936 | * then parse_inittab() simply adds in some default |
937 | * actions(i.e., runs INIT_SCRIPT and then starts a pair | 937 | * actions(i.e., runs INIT_SCRIPT and then starts a pair |
938 | * of "askfirst" shells). If CONFIG_FEATURE_USE_INITTAB | 938 | * of "askfirst" shells). If CONFIG_FEATURE_USE_INITTAB |
939 | * _is_ defined, but /etc/inittab is missing, this | 939 | * _is_ defined, but /etc/inittab is missing, this |
940 | * results in the same set of default behaviors. | 940 | * results in the same set of default behaviors. |
941 | */ | 941 | */ |
942 | static void parse_inittab(void) | 942 | static void parse_inittab(void) |
@@ -1053,7 +1053,7 @@ static void reload_signal(int sig) | |||
1053 | run_actions(RESPAWN); | 1053 | run_actions(RESPAWN); |
1054 | return; | 1054 | return; |
1055 | } | 1055 | } |
1056 | 1056 | ||
1057 | extern int init_main(int argc, char **argv) | 1057 | extern int init_main(int argc, char **argv) |
1058 | { | 1058 | { |
1059 | struct init_action *a; | 1059 | struct init_action *a; |
@@ -1083,7 +1083,7 @@ extern int init_main(int argc, char **argv) | |||
1083 | signal(SIGSTOP, stop_handler); | 1083 | signal(SIGSTOP, stop_handler); |
1084 | signal(SIGTSTP, stop_handler); | 1084 | signal(SIGTSTP, stop_handler); |
1085 | 1085 | ||
1086 | /* Turn off rebooting via CTL-ALT-DEL -- we get a | 1086 | /* Turn off rebooting via CTL-ALT-DEL -- we get a |
1087 | * SIGINT on CAD so we can shut things down gracefully... */ | 1087 | * SIGINT on CAD so we can shut things down gracefully... */ |
1088 | init_reboot(RB_DISABLE_CAD); | 1088 | init_reboot(RB_DISABLE_CAD); |
1089 | #endif | 1089 | #endif |
@@ -1125,7 +1125,7 @@ extern int init_main(int argc, char **argv) | |||
1125 | 1125 | ||
1126 | /* NOTE that if CONFIG_FEATURE_USE_INITTAB is NOT defined, | 1126 | /* NOTE that if CONFIG_FEATURE_USE_INITTAB is NOT defined, |
1127 | * then parse_inittab() simply adds in some default | 1127 | * then parse_inittab() simply adds in some default |
1128 | * actions(i.e., runs INIT_SCRIPT and then starts a pair | 1128 | * actions(i.e., runs INIT_SCRIPT and then starts a pair |
1129 | * of "askfirst" shells */ | 1129 | * of "askfirst" shells */ |
1130 | parse_inittab(); | 1130 | parse_inittab(); |
1131 | } | 1131 | } |