Commit 82e83759 authored by topjohnwu's avatar topjohnwu

Respect filesystem type when mounting mirrors

Close #405
parent bb25edc0
...@@ -645,8 +645,8 @@ void startup() { ...@@ -645,8 +645,8 @@ void startup() {
bind_mount("/system_root/system", MIRRDIR "/system"); bind_mount("/system_root/system", MIRRDIR "/system");
skip_initramfs = 1; skip_initramfs = 1;
} else if (!skip_initramfs && strstr(line, " /system ")) { } else if (!skip_initramfs && strstr(line, " /system ")) {
sscanf(line, "%s", buf); sscanf(line, "%s %*s %s", buf, buf2);
xmount(buf, MIRRDIR "/system", "ext4", MS_RDONLY, NULL); xmount(buf, MIRRDIR "/system", buf2, MS_RDONLY, NULL);
#ifdef MAGISK_DEBUG #ifdef MAGISK_DEBUG
LOGI("mount: %s <- %s\n", MIRRDIR "/system", buf); LOGI("mount: %s <- %s\n", MIRRDIR "/system", buf);
#else #else
...@@ -654,9 +654,9 @@ void startup() { ...@@ -654,9 +654,9 @@ void startup() {
#endif #endif
} else if (strstr(line, " /vendor ")) { } else if (strstr(line, " /vendor ")) {
seperate_vendor = 1; seperate_vendor = 1;
sscanf(line, "%s", buf); sscanf(line, "%s %*s %s", buf, buf2);
xmkdir(MIRRDIR "/vendor", 0755); xmkdir(MIRRDIR "/vendor", 0755);
xmount(buf, MIRRDIR "/vendor", "ext4", MS_RDONLY, NULL); xmount(buf, MIRRDIR "/vendor", buf2, MS_RDONLY, NULL);
#ifdef MAGISK_DEBUG #ifdef MAGISK_DEBUG
LOGI("mount: %s <- %s\n", MIRRDIR "/vendor", buf); LOGI("mount: %s <- %s\n", MIRRDIR "/vendor", buf);
#else #else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment