summaryrefslogtreecommitdiffstats
path: root/init/keychords.c
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2013-01-28 17:13:35 -0800
committerColin Cross <ccross@android.com>2013-06-17 12:44:35 -0700
commit2deedfe0b1ac86ebd62d19cf7da9e7dcb508ab09 (patch)
tree1a2ec1aed9c121e817c6cd7c944680bac33e05e7 /init/keychords.c
parent406c3bb885538e5003efc3736cd2b57ffef2b5cc (diff)
downloadsystem_core-2deedfe0b1ac86ebd62d19cf7da9e7dcb508ab09.zip
system_core-2deedfe0b1ac86ebd62d19cf7da9e7dcb508ab09.tar.gz
system_core-2deedfe0b1ac86ebd62d19cf7da9e7dcb508ab09.tar.bz2
init: switch property_get to use __system_property_get
Change-Id: I4fc0502a1a5b331087618a4d2e3d90948743d7bd
Diffstat (limited to 'init/keychords.c')
-rw-r--r--init/keychords.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/init/keychords.c b/init/keychords.c
index 061d157..4a64042 100644
--- a/init/keychords.c
+++ b/init/keychords.c
@@ -95,20 +95,19 @@ void keychord_init()
void handle_keychord()
{
struct service *svc;
- const char* debuggable;
- const char* adb_enabled;
+ char adb_enabled[PROP_VALUE_MAX];
int ret;
__u16 id;
// Only handle keychords if adb is enabled.
- adb_enabled = property_get("init.svc.adbd");
+ property_get("init.svc.adbd", adb_enabled);
ret = read(keychord_fd, &id, sizeof(id));
if (ret != sizeof(id)) {
ERROR("could not read keychord id\n");
return;
}
- if ((adb_enabled && !strcmp(adb_enabled, "running"))) {
+ if (!strcmp(adb_enabled, "running")) {
svc = service_find_by_keychord(id);
if (svc) {
INFO("starting service %s from keychord\n", svc->name);