You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Introduce path! macro for FsPath
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
use crate::ffi::MagiskInit;
|
||||
use base::libc::O_RDONLY;
|
||||
use base::{
|
||||
cstr, debug, libc, BufReadExt, Directory, FsPath, LibcReturn, LoggedResult, ResultExt,
|
||||
Utf8CStr, Utf8CStrBuf, Utf8CStrBufArr, WalkResult,
|
||||
debug, libc, path, BufReadExt, Directory, LibcReturn, LoggedResult, ResultExt, Utf8CStr,
|
||||
Utf8CStrBuf, Utf8CStrBufArr, WalkResult,
|
||||
};
|
||||
use std::io::BufReader;
|
||||
use std::{
|
||||
@@ -116,7 +116,7 @@ on property:init.svc.zygote=stopped
|
||||
|
||||
impl MagiskInit {
|
||||
pub(crate) fn parse_config_file(&mut self) {
|
||||
if let Ok(fd) = FsPath::from(cstr!("/data/.backup/.magisk")).open(O_RDONLY) {
|
||||
if let Ok(fd) = path!("/data/.backup/.magisk").open(O_RDONLY) {
|
||||
let mut reader = BufReader::new(fd);
|
||||
reader.foreach_props(|key, val| {
|
||||
if key == "PREINITDEVICE" {
|
||||
|
||||
Reference in New Issue
Block a user