diff options
author | Badhri Jagan Sridharan <badhri@google.com> | 2014-10-10 23:19:06 -0700 |
---|---|---|
committer | Badhri Jagan Sridharan <badhri@google.com> | 2014-10-20 13:05:56 -0700 |
commit | 162f7d797c67019a7a3f08c3b0f0ffc91d548ddc (patch) | |
tree | 85cd88612c2dfa6f5434ca92e27f06af0d61bb5f /init/parser.c | |
parent | 6d463a5f418af07bf484d356e5a3360b2632938d (diff) | |
download | system_core-162f7d797c67019a7a3f08c3b0f0ffc91d548ddc.zip system_core-162f7d797c67019a7a3f08c3b0f0ffc91d548ddc.tar.gz system_core-162f7d797c67019a7a3f08c3b0f0ffc91d548ddc.tar.bz2 |
init: Add support "&&" operator in property triggers
"&&" operator can now be used to test the validity
of two of more properties.
For example:
on property:test.a=1 && property:test.b=1
setprop test.c 1
The above stub sets the test.c to 1 only when
both test.a=1 and test.b=1
Change-Id: I72c19f7aa92231372a416193618ee6c7fd368141
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Diffstat (limited to 'init/parser.c')
-rw-r--r-- | init/parser.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/init/parser.c b/init/parser.c index 48e7aec..80bfb09 100644 --- a/init/parser.c +++ b/init/parser.c @@ -15,9 +15,10 @@ void DUMP(void) struct command *cmd; struct listnode *node; struct listnode *node2; + char name_str[256] = ""; struct socketinfo *si; int n; - + list_for_each(node, &service_list) { svc = node_to_item(node, struct service, slist); RAW("service %s\n", svc->name); @@ -34,7 +35,11 @@ void DUMP(void) list_for_each(node, &action_list) { act = node_to_item(node, struct action, alist); - RAW("on %s\n", act->name); + RAW("on "); + build_triggers_string(name_str, sizeof(name_str), act); + RAW("%s", name_str); + RAW("\n"); + list_for_each(node2, &act->commands) { cmd = node_to_item(node2, struct command, clist); RAW(" %p", cmd->func); |