mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-06-12 21:27:41 +02:00
Improve Rust implementation
- Move mmap_file implementation into Rust - Introduce Utf8CStr as the better c-string type to use
This commit is contained in:
@ -38,5 +38,9 @@ pub mod ffi {
|
||||
fn xpipe2(fds: &mut [i32; 2], flags: i32) -> i32;
|
||||
#[rust_name = "fd_path_for_cxx"]
|
||||
fn fd_path(fd: i32, buf: &mut [u8]) -> isize;
|
||||
#[rust_name = "map_file_for_cxx"]
|
||||
fn map_file(path: &[u8], rw: bool) -> &'static mut [u8];
|
||||
#[rust_name = "map_fd_for_cxx"]
|
||||
fn map_fd(fd: i32, sz: usize, rw: bool) -> &'static mut [u8];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user