diff options
author | Elliott Hughes <enh@google.com> | 2016-06-27 08:26:03 -0700 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2016-06-27 15:41:12 -0500 |
commit | cc1bc502de943356b360225692bb9b9818b0e63d (patch) | |
tree | 7c2c65a8b3161e030f3f0f0a0ffcedc4d470e26b /toys/android | |
parent | c02e584c5915b8ab0793b51664d3e4a27c7bda6c (diff) | |
download | toybox-cc1bc502de943356b360225692bb9b9818b0e63d.tar.gz |
Fix start.c build and add error reporting.
Diffstat (limited to 'toys/android')
-rw-r--r-- | toys/android/start.c | 4 |
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) |