init: switch property_get to use __system_property_get
Change-Id: I4fc0502a1a5b331087618a4d2e3d90948743d7bd
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 @@
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 @@
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 */