ksud: don't umount stock overlayfs, just remount it
This commit is contained in:
@@ -185,9 +185,8 @@ pub fn on_post_data_fs() -> Result<()> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Finally, we should do systemless mount
|
// Finally, we should do systemless mount
|
||||||
// But we should umount all stock overlayfs and remount them after module mounted
|
// But we should backup all stock overlayfs and remount them after module mounted
|
||||||
let stock_overlay = mount::StockOverlay::new();
|
let stock_overlay = mount::StockOverlay::new();
|
||||||
stock_overlay.umount_all();
|
|
||||||
|
|
||||||
// mount moduke systemlessly by overlay
|
// mount moduke systemlessly by overlay
|
||||||
if let Err(e) = mount_systemlessly(module_dir) {
|
if let Err(e) = mount_systemlessly(module_dir) {
|
||||||
|
|||||||
@@ -168,9 +168,6 @@ impl StockOverlay {
|
|||||||
unimplemented!()
|
unimplemented!()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn umount_all(&self) {
|
|
||||||
unimplemented!()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(target_os = "linux", target_os = "android"))]
|
#[cfg(any(target_os = "linux", target_os = "android"))]
|
||||||
@@ -238,19 +235,6 @@ impl StockOverlay {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn umount_all(&self) {
|
|
||||||
log::info!("stock overlay: umount all: {:?}", self.mountinfos);
|
|
||||||
for mnt in &self.mountinfos {
|
|
||||||
let Some(p) = mnt.mount_point.to_str() else {
|
|
||||||
log::warn!("Failed to umount: {}", mnt.mount_point.display());
|
|
||||||
continue;
|
|
||||||
};
|
|
||||||
|
|
||||||
let result = umount_dir(p);
|
|
||||||
log::info!("stock umount {}: {:?}", p, result);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// some ROMs mount device(ext4,exfat) to /vendor, when we do overlay mount, it will overlay
|
// some ROMs mount device(ext4,exfat) to /vendor, when we do overlay mount, it will overlay
|
||||||
|
|||||||
Reference in New Issue
Block a user