You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Prepare compilation for NDK r21
This commit is contained in:
@@ -102,7 +102,7 @@ static void decompress_ramdisk() {
|
||||
uint8_t *buf;
|
||||
size_t sz;
|
||||
mmap_ro(ramdisk_xz, buf, sz);
|
||||
int fd = open(tmp, O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC);
|
||||
int fd = xopen(tmp, O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC, 0644);
|
||||
unxz(fd, buf, sz);
|
||||
munmap(buf, sz);
|
||||
close(fd);
|
||||
@@ -113,7 +113,7 @@ static void decompress_ramdisk() {
|
||||
}
|
||||
|
||||
int dump_magisk(const char *path, mode_t mode) {
|
||||
int fd = open(path, O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC, mode);
|
||||
int fd = xopen(path, O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC, mode);
|
||||
if (fd < 0)
|
||||
return 1;
|
||||
if (!unxz(fd, magisk_xz, sizeof(magisk_xz)))
|
||||
@@ -123,7 +123,7 @@ int dump_magisk(const char *path, mode_t mode) {
|
||||
}
|
||||
|
||||
static int dump_manager(const char *path, mode_t mode) {
|
||||
int fd = open(path, O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC, mode);
|
||||
int fd = xopen(path, O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC, mode);
|
||||
if (fd < 0)
|
||||
return 1;
|
||||
if (!unxz(fd, manager_xz, sizeof(manager_xz)))
|
||||
|
||||
Reference in New Issue
Block a user