Merge change 2903
* changes: completed implementation of "trigger" for init
This commit is contained in:
commit
12a5b8804c
3 changed files with 4 additions and 3 deletions
|
|
@ -400,6 +400,8 @@ int do_restart(int nargs, char **args)
|
|||
|
||||
int do_trigger(int nargs, char **args)
|
||||
{
|
||||
action_for_each_trigger(args[1], action_add_queue_tail);
|
||||
drain_action_queue();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,8 +65,6 @@ static struct input_keychord *keychords = 0;
|
|||
static int keychords_count = 0;
|
||||
static int keychords_length = 0;
|
||||
|
||||
static void drain_action_queue(void);
|
||||
|
||||
static void notify_service_state(const char *name, const char *state)
|
||||
{
|
||||
char pname[PROP_NAME_MAX];
|
||||
|
|
@ -667,7 +665,7 @@ static void get_hardware_name(void)
|
|||
}
|
||||
}
|
||||
|
||||
static void drain_action_queue(void)
|
||||
void drain_action_queue(void)
|
||||
{
|
||||
struct listnode *node;
|
||||
struct command *cmd;
|
||||
|
|
|
|||
|
|
@ -165,6 +165,7 @@ void service_stop(struct service *svc);
|
|||
void service_start(struct service *svc, const char *dynamic_args);
|
||||
void property_changed(const char *name, const char *value);
|
||||
|
||||
void drain_action_queue(void);
|
||||
struct action *action_remove_queue_head(void);
|
||||
void action_add_queue_tail(struct action *act);
|
||||
void action_for_each_trigger(const char *trigger,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue