diff options
| author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2008-07-21 11:53:04 +0000 |
|---|---|---|
| committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2008-07-21 11:53:04 +0000 |
| commit | 525936195718b40ddb29f30fa87c15c1533c1d08 (patch) | |
| tree | d124db1b589891cbcdccbbe77bda4ea7feda7275 /init | |
| parent | ef9876a40e2dbb4e90a604739b2e318be8ed3cb6 (diff) | |
| download | busybox-w32-525936195718b40ddb29f30fa87c15c1533c1d08.tar.gz busybox-w32-525936195718b40ddb29f30fa87c15c1533c1d08.tar.bz2 busybox-w32-525936195718b40ddb29f30fa87c15c1533c1d08.zip | |
- remove superfluous forward declaration
Diffstat (limited to 'init')
| -rw-r--r-- | init/init.c | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/init/init.c b/init/init.c index 607280752..e88b88262 100644 --- a/init/init.c +++ b/init/init.c | |||
| @@ -86,7 +86,6 @@ static const char *const environment[] = { | |||
| 86 | }; | 86 | }; |
| 87 | 87 | ||
| 88 | /* Function prototypes */ | 88 | /* Function prototypes */ |
| 89 | static void delete_init_action(struct init_action *a); | ||
| 90 | static void halt_reboot_pwoff(int sig) NORETURN; | 89 | static void halt_reboot_pwoff(int sig) NORETURN; |
| 91 | 90 | ||
| 92 | static void waitfor(pid_t pid) | 91 | static void waitfor(pid_t pid) |
| @@ -474,6 +473,23 @@ static pid_t run(const struct init_action *a) | |||
| 474 | _exit(-1); | 473 | _exit(-1); |
| 475 | } | 474 | } |
| 476 | 475 | ||
| 476 | static void delete_init_action(struct init_action *action) | ||
| 477 | { | ||
| 478 | struct init_action *a, *b = NULL; | ||
| 479 | |||
| 480 | for (a = init_action_list; a; b = a, a = a->next) { | ||
| 481 | if (a == action) { | ||
| 482 | if (b == NULL) { | ||
| 483 | init_action_list = a->next; | ||
| 484 | } else { | ||
| 485 | b->next = a->next; | ||
| 486 | } | ||
| 487 | free(a); | ||
| 488 | break; | ||
| 489 | } | ||
| 490 | } | ||
| 491 | } | ||
| 492 | |||
| 477 | /* Run all commands of a particular type */ | 493 | /* Run all commands of a particular type */ |
| 478 | static void run_actions(int action_type) | 494 | static void run_actions(int action_type) |
| 479 | { | 495 | { |
| @@ -649,23 +665,6 @@ static void new_init_action(uint8_t action_type, const char *command, const char | |||
| 649 | a->command, a->action_type, a->terminal); | 665 | a->command, a->action_type, a->terminal); |
| 650 | } | 666 | } |
| 651 | 667 | ||
| 652 | static void delete_init_action(struct init_action *action) | ||
| 653 | { | ||
| 654 | struct init_action *a, *b = NULL; | ||
| 655 | |||
| 656 | for (a = init_action_list; a; b = a, a = a->next) { | ||
| 657 | if (a == action) { | ||
| 658 | if (b == NULL) { | ||
| 659 | init_action_list = a->next; | ||
| 660 | } else { | ||
| 661 | b->next = a->next; | ||
| 662 | } | ||
| 663 | free(a); | ||
| 664 | break; | ||
| 665 | } | ||
| 666 | } | ||
| 667 | } | ||
| 668 | |||
| 669 | /* NOTE that if CONFIG_FEATURE_USE_INITTAB is NOT defined, | 668 | /* NOTE that if CONFIG_FEATURE_USE_INITTAB is NOT defined, |
| 670 | * then parse_inittab() simply adds in some default | 669 | * then parse_inittab() simply adds in some default |
| 671 | * actions(i.e., runs INIT_SCRIPT and then starts a pair | 670 | * actions(i.e., runs INIT_SCRIPT and then starts a pair |
