From cc1bc502de943356b360225692bb9b9818b0e63d Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Mon, 27 Jun 2016 08:26:03 -0700 Subject: Fix start.c build and add error reporting. --- toys/android/start.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'toys/android') 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) -- cgit v1.2.3