---
 toys/android/start.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
From 5c9d8363bdef91cafca5e52b16e947aa1bef1918 Mon Sep 17 00:00:00 2001
From: Elliott Hughes <[email protected]>
Date: Mon, 27 Jun 2016 08:26:03 -0700
Subject: [PATCH] Fix start.c build and add error reporting.

---
 toys/android/start.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/toys/android/start.c b/toys/android/start.c
index 82703b1..1f358e9 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)
-- 
2.8.0.rc3.226.g39d4020

_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to