Lines Matching refs:name
125 const prop_info* SystemProperties::Find(const char* name) { in Find() argument
130 prop_area* pa = contexts_->GetPropAreaForName(name); in Find()
132 async_safe_format_log(ANDROID_LOG_ERROR, "libc", "Access denied finding property \"%s\"", name); in Find()
136 return pa->find(name); in Find()
139 static bool is_read_only(const char* name) { in is_read_only() argument
140 return strncmp(name, "ro.", 3) == 0; in is_read_only()
153 prop_area* pa = contexts_->GetPropAreaForName(pi->name); in ReadMutablePropertyValue()
174 int SystemProperties::Read(const prop_info* pi, char* name, char* value) { in Read() argument
176 if (name != nullptr) { in Read()
177 size_t namelen = strlcpy(name, pi->name, PROP_NAME_MAX); in Read()
183 pi->name, PROP_NAME_MAX - 1, name); in Read()
186 if (is_read_only(pi->name) && pi->is_long()) { in Read()
192 pi->name, strlen(pi->long_value())); in Read()
198 void (*callback)(void* cookie, const char* name, in ReadCallback() argument
203 if (is_read_only(pi->name)) { in ReadCallback()
206 callback(cookie, pi->name, pi->long_value(), serial); in ReadCallback()
208 callback(cookie, pi->name, pi->value, serial); in ReadCallback()
215 callback(cookie, pi->name, value_buf, serial); in ReadCallback()
218 int SystemProperties::Get(const char* name, char* value) { in Get() argument
219 const prop_info* pi = Find(name); in Get()
242 prop_area* pa = contexts_->GetPropAreaForName(pi->name); in Update()
244 async_safe_format_log(ANDROID_LOG_ERROR, "libc", "Could not find area for \"%s\"", pi->name); in Update()
273 int SystemProperties::Add(const char* name, unsigned int namelen, const char* value, in Add() argument
275 if (valuelen >= PROP_VALUE_MAX && !is_read_only(name)) { in Add()
292 prop_area* pa = contexts_->GetPropAreaForName(name); in Add()
294 async_safe_format_log(ANDROID_LOG_ERROR, "libc", "Access denied adding property \"%s\"", name); in Add()
298 bool ret = pa->add(name, namelen, value, valuelen); in Add()