Remove FsPath and FsPathMnt trait

Directly use Utf8CStr
This commit is contained in:
topjohnwu
2025-04-23 17:34:59 -07:00
committed by John Wu
parent 610945ac54
commit 3327fc668e
21 changed files with 62 additions and 89 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
use crate::ffi::{BootConfig, MagiskInit, backup_init};
use base::{BytesExt, FsPath, MappedFile, cstr};
use base::{BytesExt, MappedFile, cstr};
impl BootConfig {
#[allow(unused_imports, unused_unsafe)]
+1 -1
View File
@@ -6,7 +6,7 @@ use crate::{
logging::setup_klog,
};
use base::{
FsPath, FsPathMnt, LibcReturn, LoggedResult, ResultExt, cstr, info,
LibcReturn, LoggedResult, ResultExt, cstr, info,
libc::{basename, getpid, mount, umask},
raw_cstr,
};
+1 -1
View File
@@ -1,5 +1,5 @@
use base::{
FsPath, LOGGER, LogLevel, Logger, SilentResultExt, Utf8CStr, cstr,
LOGGER, LogLevel, Logger, SilentResultExt, Utf8CStr, cstr,
libc::{
O_CLOEXEC, O_RDWR, O_WRONLY, S_IFCHR, STDERR_FILENO, STDIN_FILENO, STDOUT_FILENO, SYS_dup3,
makedev, mknod, syscall,
+1 -2
View File
@@ -1,8 +1,7 @@
use crate::ffi::MagiskInit;
use base::libc::{TMPFS_MAGIC, statfs};
use base::{
Directory, FsPath, FsPathBuilder, FsPathMnt, LibcReturn, LoggedResult, ResultExt, Utf8CStr,
cstr, debug, libc,
Directory, FsPathBuilder, LibcReturn, LoggedResult, ResultExt, Utf8CStr, cstr, debug, libc,
libc::{chdir, chroot, execve, exit, mount},
parse_mount_info, raw_cstr,
};
+2 -2
View File
@@ -2,8 +2,8 @@ use crate::consts::{ROOTMNT, ROOTOVL};
use crate::ffi::MagiskInit;
use base::libc::{O_CREAT, O_RDONLY, O_WRONLY};
use base::{
BufReadExt, Directory, FsPath, FsPathBuilder, FsPathMnt, LoggedResult, ResultExt, Utf8CStr,
Utf8CString, clone_attr, cstr, debug,
BufReadExt, Directory, FsPathBuilder, LoggedResult, ResultExt, Utf8CStr, Utf8CString,
clone_attr, cstr, debug,
};
use std::io::BufReader;
use std::{
+2 -2
View File
@@ -2,8 +2,8 @@ use crate::consts::{PREINITMIRR, SELINUXMOCK};
use crate::ffi::{MagiskInit, preload_ack, preload_lib, preload_policy, split_plat_cil};
use base::const_format::concatcp;
use base::{
BytesExt, FsPath, FsPathMnt, LibcReturn, LoggedResult, MappedFile, ResultExt, Utf8CStr, cstr,
debug, error, info, libc, raw_cstr,
BytesExt, LibcReturn, LoggedResult, MappedFile, ResultExt, Utf8CStr, cstr, debug, error, info,
libc, raw_cstr,
};
use magiskpolicy::ffi::SePolicy;
use std::io::{Read, Write};
+1 -1
View File
@@ -1,6 +1,6 @@
use crate::ffi::MagiskInit;
use base::{
FsPath, FsPathMnt, LoggedResult, MappedFile, MutBytesExt, ResultExt, cstr, debug, error,
LoggedResult, MappedFile, MutBytesExt, ResultExt, cstr, debug, error,
libc::{O_CLOEXEC, O_CREAT, O_RDONLY, O_WRONLY},
};
use std::io::Write;