You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Replace rust inner functions to try blocks
This commit is contained in:
@@ -106,11 +106,7 @@ pub fn clean_mounts() {
|
||||
let module_mnt = FsPathBuf::new(&mut buf).join(magisk_tmp).join(MODULEMNT);
|
||||
let _: LoggedResult<()> = try {
|
||||
unsafe {
|
||||
libc::umount2(
|
||||
module_mnt.as_ptr(),
|
||||
libc::MNT_DETACH,
|
||||
)
|
||||
.as_os_err()?;
|
||||
libc::umount2(module_mnt.as_ptr(), libc::MNT_DETACH).as_os_err()?;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -125,11 +121,7 @@ pub fn clean_mounts() {
|
||||
ptr::null(),
|
||||
)
|
||||
.as_os_err()?;
|
||||
libc::umount2(
|
||||
worker_dir.as_ptr(),
|
||||
libc::MNT_DETACH,
|
||||
)
|
||||
.as_os_err()?;
|
||||
libc::umount2(worker_dir.as_ptr(), libc::MNT_DETACH).as_os_err()?;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user