You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Use rust to implement collect/reset overlay context
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
#![feature(format_args_nl)]
|
||||
#![feature(once_cell_try)]
|
||||
|
||||
use logging::setup_klog;
|
||||
use mount::{is_device_mounted, switch_root};
|
||||
use rootdir::inject_magisk_rc;
|
||||
use rootdir::{inject_magisk_rc, collect_overlay_contexts, reset_overlay_contexts};
|
||||
// Has to be pub so all symbols in that crate is included
|
||||
pub use magiskpolicy;
|
||||
|
||||
@@ -18,6 +19,8 @@ pub mod ffi {
|
||||
fn inject_magisk_rc(fd: i32, tmp_dir: Utf8CStrRef);
|
||||
fn switch_root(path: Utf8CStrRef);
|
||||
fn is_device_mounted(dev: u64, target: Pin<&mut CxxString>) -> bool;
|
||||
fn collect_overlay_contexts(src: Utf8CStrRef);
|
||||
fn reset_overlay_contexts();
|
||||
}
|
||||
|
||||
unsafe extern "C++" {
|
||||
|
||||
Reference in New Issue
Block a user