mirror of
https://github.com/topjohnwu/Magisk.git
synced 2026-01-17 07:12:32 -08:00
Introduce cstr_buf helper functions
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
use crate::ffi::MagiskInit;
|
||||
use base::libc::O_RDONLY;
|
||||
use base::{
|
||||
debug, libc, path, BufReadExt, Directory, LibcReturn, LoggedResult, ResultExt, Utf8CStr,
|
||||
Utf8CStrBuf, Utf8CStrBufArr, WalkResult,
|
||||
cstr_buf, debug, libc, path, BufReadExt, Directory, LibcReturn, LoggedResult, ResultExt,
|
||||
Utf8CStr, Utf8CStrBuf, Utf8CStrBufArr, WalkResult,
|
||||
};
|
||||
use std::io::BufReader;
|
||||
use std::{
|
||||
@@ -48,8 +48,8 @@ pub fn collect_overlay_contexts(src: &Utf8CStr) {
|
||||
OVERLAY_ATTRS
|
||||
.get_or_try_init(|| -> LoggedResult<_> {
|
||||
let mut contexts = vec![];
|
||||
let mut con = Utf8CStrBufArr::default();
|
||||
let mut path = Utf8CStrBufArr::default();
|
||||
let mut con = cstr_buf::default();
|
||||
let mut path = cstr_buf::default();
|
||||
let mut src = Directory::open(src)?;
|
||||
src.path(&mut path)?;
|
||||
let src_len = path.len();
|
||||
|
||||
Reference in New Issue
Block a user