mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-12-12 01:01:49 +00:00
Further fix oplus.fstab support
* Further fix `oplus.fstab` support In some oneplus devices, `oplus.fstab` does exists but `init` never loaded it and those entries in `oplus.fstab` are written directly to `fstab.qcom`. Previous implementation will introduce duplicate entries to `fstab.qcom` and brick the device. This commit filters those entries from `oplus.fstab` that are already in `fstab.qcom` and further filters duplicated entries in `oplus.fstab` (keep only the last entry). Fix #5016 * Fix UB Since we moved entry, we need to explicitly copy its member. For c++23 we can use `auto{}`.
This commit is contained in:
@@ -26,6 +26,8 @@ struct fstab_entry {
|
||||
fstab_entry() = default;
|
||||
fstab_entry(const fstab_entry &) = delete;
|
||||
fstab_entry(fstab_entry &&) = default;
|
||||
fstab_entry &operator=(const fstab_entry&) = delete;
|
||||
fstab_entry &operator=(fstab_entry&&) = default;
|
||||
void to_file(FILE *fp);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user