- remove superfluous forward declaration
This commit is contained in:
parent
ef9876a40e
commit
5259361957
35
init/init.c
35
init/init.c
@ -86,7 +86,6 @@ static const char *const environment[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* Function prototypes */
|
/* Function prototypes */
|
||||||
static void delete_init_action(struct init_action *a);
|
|
||||||
static void halt_reboot_pwoff(int sig) NORETURN;
|
static void halt_reboot_pwoff(int sig) NORETURN;
|
||||||
|
|
||||||
static void waitfor(pid_t pid)
|
static void waitfor(pid_t pid)
|
||||||
@ -474,6 +473,23 @@ static pid_t run(const struct init_action *a)
|
|||||||
_exit(-1);
|
_exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void delete_init_action(struct init_action *action)
|
||||||
|
{
|
||||||
|
struct init_action *a, *b = NULL;
|
||||||
|
|
||||||
|
for (a = init_action_list; a; b = a, a = a->next) {
|
||||||
|
if (a == action) {
|
||||||
|
if (b == NULL) {
|
||||||
|
init_action_list = a->next;
|
||||||
|
} else {
|
||||||
|
b->next = a->next;
|
||||||
|
}
|
||||||
|
free(a);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Run all commands of a particular type */
|
/* Run all commands of a particular type */
|
||||||
static void run_actions(int action_type)
|
static void run_actions(int action_type)
|
||||||
{
|
{
|
||||||
@ -649,23 +665,6 @@ static void new_init_action(uint8_t action_type, const char *command, const char
|
|||||||
a->command, a->action_type, a->terminal);
|
a->command, a->action_type, a->terminal);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void delete_init_action(struct init_action *action)
|
|
||||||
{
|
|
||||||
struct init_action *a, *b = NULL;
|
|
||||||
|
|
||||||
for (a = init_action_list; a; b = a, a = a->next) {
|
|
||||||
if (a == action) {
|
|
||||||
if (b == NULL) {
|
|
||||||
init_action_list = a->next;
|
|
||||||
} else {
|
|
||||||
b->next = a->next;
|
|
||||||
}
|
|
||||||
free(a);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* NOTE that if CONFIG_FEATURE_USE_INITTAB is NOT defined,
|
/* NOTE that if CONFIG_FEATURE_USE_INITTAB is NOT defined,
|
||||||
* then parse_inittab() simply adds in some default
|
* then parse_inittab() simply adds in some default
|
||||||
* actions(i.e., runs INIT_SCRIPT and then starts a pair
|
* actions(i.e., runs INIT_SCRIPT and then starts a pair
|
||||||
|
Loading…
Reference in New Issue
Block a user