Merge "Remove ANDROID_PROPERTY_WORKSPACE" am: c68998441c
am: c64de373c1
* commit 'c64de373c13183c424a2a27c34f45311328374d5':
Remove ANDROID_PROPERTY_WORKSPACE
This commit is contained in:
commit
876c9c803e
|
@ -64,13 +64,6 @@ static bool property_area_initialized = false;
|
|||
|
||||
static int property_set_fd = -1;
|
||||
|
||||
struct workspace {
|
||||
size_t size;
|
||||
int fd;
|
||||
};
|
||||
|
||||
static workspace pa_workspace;
|
||||
|
||||
void property_init() {
|
||||
if (property_area_initialized) {
|
||||
return;
|
||||
|
@ -82,13 +75,6 @@ void property_init() {
|
|||
ERROR("Failed to initialize property area\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
pa_workspace.size = 0;
|
||||
pa_workspace.fd = open(PROP_FILENAME, O_RDONLY | O_NOFOLLOW | O_CLOEXEC);
|
||||
if (pa_workspace.fd == -1) {
|
||||
ERROR("Failed to open %s: %s\n", PROP_FILENAME, strerror(errno));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
static int check_mac_perms(const char *name, char *sctx, struct ucred *cr)
|
||||
|
@ -354,12 +340,6 @@ static void handle_property_set_fd()
|
|||
}
|
||||
}
|
||||
|
||||
void get_property_workspace(int *fd, int *sz)
|
||||
{
|
||||
*fd = pa_workspace.fd;
|
||||
*sz = pa_workspace.size;
|
||||
}
|
||||
|
||||
static void load_properties_from_file(const char *, const char *);
|
||||
|
||||
/*
|
||||
|
|
|
@ -32,7 +32,6 @@ extern void property_load_boot_defaults(void);
|
|||
extern void load_persist_props(void);
|
||||
extern void load_system_props(void);
|
||||
extern void start_property_service(void);
|
||||
void get_property_workspace(int *fd, int *sz);
|
||||
std::string property_get(const char* name);
|
||||
extern int property_set(const char *name, const char *value);
|
||||
extern bool properties_initialized();
|
||||
|
|
|
@ -400,14 +400,7 @@ bool Service::Start(const std::vector<std::string>& dynamic_args) {
|
|||
|
||||
pid_t pid = fork();
|
||||
if (pid == 0) {
|
||||
int fd, sz;
|
||||
|
||||
umask(077);
|
||||
if (properties_initialized()) {
|
||||
get_property_workspace(&fd, &sz);
|
||||
std::string tmp = StringPrintf("%d,%d", dup(fd), sz);
|
||||
add_environment("ANDROID_PROPERTY_WORKSPACE", tmp.c_str());
|
||||
}
|
||||
|
||||
for (const auto& ei : envvars_) {
|
||||
add_environment(ei.name.c_str(), ei.value.c_str());
|
||||
|
|
Loading…
Reference in New Issue