mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-22 16:07:39 +00:00
Fix typos
This commit is contained in:
parent
2051836a73
commit
30bf5c8448
@ -24,6 +24,7 @@ pub fn setup_mounts() {
|
|||||||
let dev_path = FsPathBuf::new(&mut dev_buf)
|
let dev_path = FsPathBuf::new(&mut dev_buf)
|
||||||
.join(magisk_tmp)
|
.join(magisk_tmp)
|
||||||
.join(PREINITDEV);
|
.join(PREINITDEV);
|
||||||
|
let mut mounted = false;
|
||||||
if let Ok(attr) = dev_path.get_attr() {
|
if let Ok(attr) = dev_path.get_attr() {
|
||||||
if attr.st.st_mode & libc::S_IFMT as c_uint == libc::S_IFBLK.as_() {
|
if attr.st.st_mode & libc::S_IFMT as c_uint == libc::S_IFBLK.as_() {
|
||||||
// DO NOT mount the block device directly, as we do not know the flags and configs
|
// DO NOT mount the block device directly, as we do not know the flags and configs
|
||||||
@ -33,7 +34,6 @@ pub fn setup_mounts() {
|
|||||||
// mount point mounting our desired partition, and then bind mount the target folder.
|
// mount point mounting our desired partition, and then bind mount the target folder.
|
||||||
let preinit_dev = attr.st.st_rdev;
|
let preinit_dev = attr.st.st_rdev;
|
||||||
let mnt_path = FsPathBuf::new(&mut buf).join(magisk_tmp).join(PREINITMIRR);
|
let mnt_path = FsPathBuf::new(&mut buf).join(magisk_tmp).join(PREINITMIRR);
|
||||||
let mut mounted = false;
|
|
||||||
for info in parse_mount_info("self") {
|
for info in parse_mount_info("self") {
|
||||||
if info.root == "/" && info.device == preinit_dev {
|
if info.root == "/" && info.device == preinit_dev {
|
||||||
if !info.fs_option.split(',').any(|s| s == "rw") {
|
if !info.fs_option.split(',').any(|s| s == "rw") {
|
||||||
@ -64,14 +64,14 @@ pub fn setup_mounts() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if !mounted {
|
|
||||||
warn!("mount: preinit mirror not mounted");
|
|
||||||
dev_path.remove().ok();
|
|
||||||
} else {
|
|
||||||
debug!("mount: preinit mirror mounted");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if !mounted {
|
||||||
|
warn!("mount: preinit mirror not mounted");
|
||||||
|
dev_path.remove().ok();
|
||||||
|
} else {
|
||||||
|
debug!("mount: preinit mirror mounted");
|
||||||
|
}
|
||||||
|
|
||||||
// Bind remount module root to clear nosuid
|
// Bind remount module root to clear nosuid
|
||||||
let module_mnt = FsPathBuf::new(&mut buf).join(magisk_tmp).join(MODULEMNT);
|
let module_mnt = FsPathBuf::new(&mut buf).join(magisk_tmp).join(MODULEMNT);
|
||||||
|
@ -4,7 +4,7 @@ pub const LOGFILE: &str = "/cache/magisk.log";
|
|||||||
|
|
||||||
// data paths
|
// data paths
|
||||||
const SECURE_DIR: &str = "/data/adb";
|
const SECURE_DIR: &str = "/data/adb";
|
||||||
pub const MODULEROOT: &str = concatcp!(SECURE_DIR, "modules");
|
pub const MODULEROOT: &str = concatcp!(SECURE_DIR, "/modules");
|
||||||
|
|
||||||
// tmpfs paths
|
// tmpfs paths
|
||||||
const INTERNAL_DIR: &str = ".magisk";
|
const INTERNAL_DIR: &str = ".magisk";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user