mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-04-22 11:51:36 +00:00
Use metadata even if it is f2fs
This commit is contained in:
parent
9cc50b20d8
commit
461f7e9f89
@ -201,12 +201,16 @@ pub fn find_preinit_device() -> String {
|
|||||||
let (_, preinit_info, _) = matched_info.select_nth_unstable_by(
|
let (_, preinit_info, _) = matched_info.select_nth_unstable_by(
|
||||||
0,
|
0,
|
||||||
|(ap, MountInfo { fs_type: at, .. }), (bp, MountInfo { fs_type: bt, .. })| match (
|
|(ap, MountInfo { fs_type: at, .. }), (bp, MountInfo { fs_type: bt, .. })| match (
|
||||||
|
ap,
|
||||||
|
bp,
|
||||||
at.as_str() == "ext4",
|
at.as_str() == "ext4",
|
||||||
bt.as_str() == "ext4",
|
bt.as_str() == "ext4",
|
||||||
) {
|
) {
|
||||||
// take ext4 over others (f2fs) because f2fs has a kernel bug that causes kernel panic
|
// metadata is not affected by f2fs kernel bug
|
||||||
(true, false) => Less,
|
(PartId::Metadata, _, _, true) | (_, PartId::Metadata, true, _) => ap.cmp(bp),
|
||||||
(false, true) => Greater,
|
// otherwise, take ext4 f2fs because f2fs has a kernel bug that causes kernel panic
|
||||||
|
(_, _, true, false) => Less,
|
||||||
|
(_, _, false, true) => Greater,
|
||||||
// if both has the same fs type, compare the mount point
|
// if both has the same fs type, compare the mount point
|
||||||
_ => ap.cmp(bp),
|
_ => ap.cmp(bp),
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user