summaryrefslogtreecommitdiffstats
path: root/init/property_service.c
diff options
context:
space:
mode:
Diffstat (limited to 'init/property_service.c')
-rw-r--r--init/property_service.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/init/property_service.c b/init/property_service.c
index 33ec146..cd47171 100644
--- a/init/property_service.c
+++ b/init/property_service.c
@@ -299,19 +299,9 @@ static int check_perms(const char *name, unsigned int uid, unsigned int gid, cha
return 0;
}
-const char* property_get(const char *name)
+int property_get(const char *name, char value[PROP_VALUE_MAX])
{
- prop_info *pi;
-
- if(strlen(name) >= PROP_NAME_MAX) return 0;
-
- pi = (prop_info*) __system_property_find(name);
-
- if(pi != 0) {
- return pi->value;
- } else {
- return 0;
- }
+ return __system_property_get(name, value);
}
static void write_persistent_property(const char *name, const char *value)
@@ -598,8 +588,11 @@ int properties_inited(void)
static void load_override_properties() {
#ifdef ALLOW_LOCAL_PROP_OVERRIDE
- const char *debuggable = property_get("ro.debuggable");
- if (debuggable && (strcmp(debuggable, "1") == 0)) {
+ char debuggable[PROP_VALUE_MAX];
+ int ret;
+
+ ret = property_get("ro.debuggable", debuggable);
+ if (ret && (strcmp(debuggable, "1") == 0)) {
load_properties_from_file(PROP_PATH_LOCAL_OVERRIDE);
}
#endif /* ALLOW_LOCAL_PROP_OVERRIDE */