ksud: refine mount

- `magic_mount` now takes the tmp_path from its argument
- `.notmpfs` and `.nomount` now behave the same

skip:
ksud: cache tmp path (74ce44de21963fddc83897846eed28eca89d78aa)

Co-authored-by: shatyuka <shatyuka@qq.com>
Signed-off-by: Faris <rsuntk@yukiprjkt.my.id>
This commit is contained in:
5ec1cff
2025-10-19 03:00:52 +07:00
committed by ShirkNeko
parent cc0a3590ce
commit b1564b77a2
3 changed files with 16 additions and 15 deletions

View File

@@ -183,7 +183,7 @@ fn is_ok_empty(dir: &str) -> bool {
}
}
pub fn get_tmp_path() -> String {
pub fn find_tmp_path() -> String {
let dirs = ["/debug_ramdisk", "/patch_hw", "/oem", "/root", "/sbin"];
// find empty directory
@@ -195,11 +195,6 @@ pub fn get_tmp_path() -> String {
"".to_string()
}
pub fn get_work_dir() -> String {
let tmp_path = get_tmp_path();
format!("{}/workdir/", tmp_path)
}
#[cfg(target_os = "android")]
fn link_ksud_to_bin() -> Result<()> {
let ksu_bin = PathBuf::from(defs::DAEMON_PATH);