aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
Diffstat (limited to 'toys')
-rw-r--r--toys/android/start.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/toys/android/start.c b/toys/android/start.c
index 82703b1f..1f358e90 100644
--- a/toys/android/start.c
+++ b/toys/android/start.c
@@ -31,6 +31,7 @@ config STOP
static void start_stop(int start)
{
+ char *property = start ? "ctl.start" : "ctl.stop";
// null terminated in both directions
char *services[] = {0,"netd","surfaceflinger","zygote","zygote_secondary",0},
**ss = toys.optargs;
@@ -45,7 +46,8 @@ static void start_stop(int start)
}
for (; *ss; ss += direction)
- property_set(start ? "ctl.start" : "ctl.stop", property, *ss);
+ if (property_set(property, *ss))
+ error_exit("failed to set property '%s' to '%s'", property, *ss);
}
void start_main(void)