diff options
author | San Mehat <san@google.com> | 2009-05-19 13:30:46 -0700 |
---|---|---|
committer | San Mehat <san@google.com> | 2009-05-19 13:33:07 -0700 |
commit | f24e252903ca0f71c7fbfb135cf17e83e0c2ea90 (patch) | |
tree | 65d2499db0682ad75bbd21a365bfcfc00756d3a3 /init/init.h | |
parent | 1b154930b2c2634dce9c04d5d5cec7acb229ccb0 (diff) | |
download | system_core-f24e252903ca0f71c7fbfb135cf17e83e0c2ea90.zip system_core-f24e252903ca0f71c7fbfb135cf17e83e0c2ea90.tar.gz system_core-f24e252903ca0f71c7fbfb135cf17e83e0c2ea90.tar.bz2 |
init: Add the ability to start services with dynamic arguments.
To add arguments dynamically to a service, start the service like so:
setprop ctl.start service_to_run:arg1 arg2 arg3...
To start a service with *no* dynamic arguments, start the service normally:
setprop ctl.start service_to_run
Dynamic arguments are only supported on 'oneshot' services
Signed-off-by: San Mehat <san@google.com>
Diffstat (limited to 'init/init.h')
-rw-r--r-- | init/init.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/init/init.h b/init/init.h index b93eb50..f306b7b 100644 --- a/init/init.h +++ b/init/init.h @@ -116,6 +116,8 @@ struct svcenvinfo { #define NR_SVC_SUPP_GIDS 6 /* six supplementary groups */ +#define SVC_MAXARGS 64 + struct service { /* list of all services */ struct listnode slist; @@ -160,7 +162,7 @@ void service_for_each_class(const char *classname, void service_for_each_flags(unsigned matchflags, void (*func)(struct service *svc)); void service_stop(struct service *svc); -void service_start(struct service *svc); +void service_start(struct service *svc, const char *dynamic_args); void property_changed(const char *name, const char *value); struct action *action_remove_queue_head(void); |