mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-23 18:15:30 +00:00
Fix meizu rootfs type
This commit is contained in:
parent
f9d22cf8ee
commit
726ffdcd98
@ -40,7 +40,9 @@ bool SecondStageInit::prepare() {
|
||||
argv[0] = (char *) INIT_PATH;
|
||||
|
||||
// Some weird devices like meizu, uses 2SI but still have legacy rootfs
|
||||
if (struct statfs sfs{}; statfs("/", &sfs) == 0 && sfs.f_type == RAMFS_MAGIC) {
|
||||
struct statfs sfs{};
|
||||
statfs("/", &sfs);
|
||||
if (sfs.f_type == RAMFS_MAGIC || sfs.f_type == TMPFS_MAGIC) {
|
||||
// We are still on rootfs, so make sure we will execute the init of the 2nd stage
|
||||
unlink("/init");
|
||||
xsymlink(INIT_PATH, "/init");
|
||||
|
Loading…
Reference in New Issue
Block a user