summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorAndroid Code Review <code-review@android.com>2009-08-27 07:36:36 -0700
committerAndroid Code Review <code-review@android.com>2009-08-27 07:36:36 -0700
commit12a5b8804c987a714a2a289d95e36ff84e967a7a (patch)
tree78956323897c899fab77ffda8ef8adf4405196b4 /init
parentcef31a02544d91b85481a5fa032b6126dbb32365 (diff)
parent11e1c42df69b15c938aa1b7570e4370e6ab15a86 (diff)
downloadsystem_core-12a5b8804c987a714a2a289d95e36ff84e967a7a.zip
system_core-12a5b8804c987a714a2a289d95e36ff84e967a7a.tar.gz
system_core-12a5b8804c987a714a2a289d95e36ff84e967a7a.tar.bz2
Merge change 2903
* changes: completed implementation of "trigger" for init
Diffstat (limited to 'init')
-rw-r--r--init/builtins.c2
-rw-r--r--init/init.c4
-rw-r--r--init/init.h1
3 files changed, 4 insertions, 3 deletions
diff --git a/init/builtins.c b/init/builtins.c
index 93ce6e8..43c29eb 100644
--- a/init/builtins.c
+++ b/init/builtins.c
@@ -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;
}
diff --git a/init/init.c b/init/init.c
index dfc858a..896aff8 100644
--- a/init/init.c
+++ b/init/init.c
@@ -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;
diff --git a/init/init.h b/init/init.h
index f306b7b..60c3055 100644
--- a/init/init.h
+++ b/init/init.h
@@ -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,