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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user