Commit 806fec70 authored by topjohnwu's avatar topjohnwu

Add new rules to unmount

parent b3da28ea
...@@ -89,10 +89,10 @@ int hide_daemon() { ...@@ -89,10 +89,10 @@ int hide_daemon() {
} }
} }
// First unmount the dummy skeletons, cache mounts, and /sbin links // First unmount the mirror, dummy skeletons, cache mounts, and /sbin links
vec_for_each_r(&mount_list, line) { vec_for_each_r(&mount_list, line) {
if (strstr(line, "tmpfs /system") || strstr(line, "tmpfs /vendor") || strstr(line, "tmpfs /sbin") if (strstr(line, "tmpfs /system") || strstr(line, "tmpfs /vendor") || strstr(line, "tmpfs /sbin")
|| (strstr(line, cache_block) && strstr(line, "/system/")) ) { || (strstr(line, cache_block) && strstr(line, "/system/")) || strstr(line, MIRRDIR) ) {
sscanf(line, "%*s %512s", buffer); sscanf(line, "%*s %512s", buffer);
lazy_unmount(buffer); lazy_unmount(buffer);
} }
...@@ -107,7 +107,7 @@ int hide_daemon() { ...@@ -107,7 +107,7 @@ int hide_daemon() {
// Unmount loop mounts // Unmount loop mounts
vec_for_each_r(&mount_list, line) { vec_for_each_r(&mount_list, line) {
if (strstr(line, "/dev/block/loop") && !strstr(line, DUMMDIR)) { if (strstr(line, "/dev/block/loop") || strstr(line, DUMMDIR)) {
sscanf(line, "%*s %512s", buffer); sscanf(line, "%*s %512s", buffer);
lazy_unmount(buffer); lazy_unmount(buffer);
} }
......
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