msm8974-common: Allow vendor init to override props

Change-Id: Iee06664aee1e59596aa12e2da11319f82767193a
This commit is contained in:
Michael Bestas 2016-02-21 02:57:44 +02:00 committed by Kevin F. Haggerty
parent 603779b03a
commit 70c6f3833b
2 changed files with 15 additions and 0 deletions

View File

@ -34,6 +34,9 @@
#include <sys/stat.h>
#include <sys/types.h>
#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
#include <sys/_system_properties.h>
#include "vendor_init.h"
#include "property_service.h"
#include "log.h"
@ -46,6 +49,17 @@ void init_target_properties()
{
}
void property_override(char const prop[], char const value[])
{
prop_info *pi;
pi = (prop_info*) __system_property_find(prop);
if (pi)
__system_property_update(pi, value, strlen(value));
else
__system_property_add(prop, strlen(prop), value, strlen(value));
}
static int read_file2(const char *fname, char *data, int max_size)
{
int fd, rc;

View File

@ -31,5 +31,6 @@
#define __INIT_MSM8974__H__
void init_target_properties();
void property_override(char const prop[], char const value[]);
#endif /* __INIT_MSM8974__H__ */