29#ifndef _INCLUDE_SYS__SYSTEM_PROPERTIES_H
30#define _INCLUDE_SYS__SYSTEM_PROPERTIES_H
32#include "system_properties.h"
35#define __predict_true(exp) (exp)
36#define __predict_false(exp) (exp)
41#define PROP_AREA_MAGIC 0x504f5250
42#define PROP_AREA_VERSION 0xfc6ed0ab
43#define PROP_AREA_VERSION_COMPAT 0x45434f76
45#define PROP_SERVICE_NAME "/tmp/tbox_propertyd.sock"
46#define PROP_FILENAME "/var/run/__tbox_property__"
47#define PROP_PID_FILE "/var/run/tbox_propertyd.pid"
49#define PA_SIZE (256 * 1024)
51#define SERIAL_VALUE_LEN(serial) ((serial) >> 24)
52#define SERIAL_DIRTY(serial) ((serial) & 1)
59 char name[PROP_NAME_MAX];
60 char value[PROP_VALUE_MAX];
63#define PROP_MSG_SETPROP 1
64#define PROP_MSG_ARRAY 2
85#define PROP_PATH_RAMDISK_DEFAULT "/default.prop"
86#define PROP_PATH_SYSTEM_BUILD "/system/build.prop"
87#define PROP_PATH_SYSTEM_DEFAULT "/system/default.prop"
88#define PROP_PATH_LOCAL_OVERRIDE "/data/local.prop"
89#define PROP_PATH_FACTORY "/factory/factory.prop"
90#define PROP_PATH_TBOX_DEFAULT TBOX_ETC_RO_PATH"/default.prop"
91#define PROP_PATH_TBOX_PROJECT TBOX_ETC_RO_PATH"/project.prop"
92#define PERSISTENT_PROPERTY_DIR TBOX_ETC_RW_PATH
98int __system_property_set_filename(
const char *filename);
100int __system_property_area_init_mm();
107int __system_property_area_init();
117int __system_property_add(
const char *name,
unsigned int namelen,
118 const char *value,
unsigned int valuelen);
128int __system_property_update(prop_info *pi,
const char *value,
unsigned int len);
135unsigned int __system_property_serial(
const prop_info *pi);
140unsigned int __system_property_wait_any(
unsigned int serial);
145const prop_info *__system_property_find_compat(
const char *name);
147int __system_property_read_compat(
const prop_info *pi,
char *name,
char *value);
149int __system_property_foreach_compat(
150 void (*propfn)(
const prop_info *pi,
void *cookie),
Definition _system_properties.h:57