diff options
Diffstat (limited to 'init/keychords.c')
-rw-r--r-- | init/keychords.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/init/keychords.c b/init/keychords.c index 53ab39115..febb62fab 100644 --- a/init/keychords.c +++ b/init/keychords.c | |||
@@ -103,14 +103,14 @@ void handle_keychord() | |||
103 | // and on user builds for users that are developers. | 103 | // and on user builds for users that are developers. |
104 | debuggable = property_get("ro.debuggable"); | 104 | debuggable = property_get("ro.debuggable"); |
105 | adb_enabled = property_get("init.svc.adbd"); | 105 | adb_enabled = property_get("init.svc.adbd"); |
106 | ret = read(keychord_fd, &id, sizeof(id)); | ||
107 | if (ret != sizeof(id)) { | ||
108 | ERROR("could not read keychord id\n"); | ||
109 | return; | ||
110 | } | ||
111 | |||
106 | if ((debuggable && !strcmp(debuggable, "1")) || | 112 | if ((debuggable && !strcmp(debuggable, "1")) || |
107 | (adb_enabled && !strcmp(adb_enabled, "running"))) { | 113 | (adb_enabled && !strcmp(adb_enabled, "running"))) { |
108 | ret = read(keychord_fd, &id, sizeof(id)); | ||
109 | if (ret != sizeof(id)) { | ||
110 | ERROR("could not read keychord id\n"); | ||
111 | return; | ||
112 | } | ||
113 | |||
114 | svc = service_find_by_keychord(id); | 114 | svc = service_find_by_keychord(id); |
115 | if (svc) { | 115 | if (svc) { |
116 | INFO("starting service %s from keychord\n", svc->name); | 116 | INFO("starting service %s from keychord\n", svc->name); |