18#ifndef __CUTILS_PROPERTIES_H
19#define __CUTILS_PROPERTIES_H
35int property_get(
const char *key,
char *value,
const char *default_value);
39int property_set(
const char *key,
const char *value);
41int property_list(
void (*propfn)(
const char *key,
const char *value,
void *cookie),
void *cookie);
43int property_init(
void);
45#if defined(__BIONIC_FORTIFY)
47extern int __property_get_real(
const char *,
char *,
const char *)
48 __asm__(__USER_LABEL_PREFIX__
"property_get");
49__errordecl(__property_get_too_small_error,
"property_get() called with too small of a buffer");
51__BIONIC_FORTIFY_INLINE
52int property_get(
const char *key,
char *value,
const char *default_value) {
53 size_t bos = __bos(value);
54 if (bos < PROP_VALUE_MAX) {
55 __property_get_too_small_error();
57 return __property_get_real(key, value, default_value);
62#ifdef HAVE_SYSTEM_PROPERTY_SERVER
67#define SYSTEM_PROPERTY_PIPE_NAME "/tmp/android-sysprop"
70 kSystemPropertyUnknown = 0,