init: expand_props on trigger

Bug: 19608716
Change-Id: Ifce8bfde04f8e6f707245e0b53400072d94447b2
This commit is contained in:
Mark Salyzyn 2015-05-27 10:46:54 -07:00
parent 3464c77b8d
commit dd0e3162a5
1 changed files with 7 additions and 1 deletions

View File

@ -591,7 +591,13 @@ int do_powerctl(int nargs, char **args)
int do_trigger(int nargs, char **args)
{
action_for_each_trigger(args[1], action_add_queue_tail);
char prop_val[PROP_VALUE_MAX];
int res = expand_props(prop_val, args[1], sizeof(prop_val));
if (res) {
ERROR("trigger: cannot expand '%s'\n", args[1]);
return -EINVAL;
}
action_for_each_trigger(prop_val, action_add_queue_tail);
return 0;
}