mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-10-16 06:45:08 +00:00
Use mmap_data more widely
This commit is contained in:
@@ -74,12 +74,9 @@ static bool check_precompiled(const char *precompiled) {
|
||||
}
|
||||
|
||||
static void load_cil(struct cil_db *db, const char *file) {
|
||||
char *addr;
|
||||
size_t size;
|
||||
mmap_ro(file, addr, size);
|
||||
cil_add_file(db, (char *) file, addr, size);
|
||||
auto d = mmap_data(file);
|
||||
cil_add_file(db, (char *) file, (char *) d.buf, d.sz);
|
||||
LOGD("cil_add [%s]\n", file);
|
||||
munmap(addr, size);
|
||||
}
|
||||
|
||||
sepolicy *sepolicy::from_file(const char *file) {
|
||||
|
Reference in New Issue
Block a user