You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
C++/Rust 2 way binding for MagiskD
This commit is contained in:
@@ -3,7 +3,7 @@ use std::ffi::{c_char, c_void};
|
||||
use std::fmt::Write as FmtWrite;
|
||||
use std::fs::File;
|
||||
use std::io::{IoSlice, Read, Write};
|
||||
use std::os::fd::{AsRawFd, FromRawFd, RawFd};
|
||||
use std::os::fd::{FromRawFd, RawFd};
|
||||
use std::ptr::null_mut;
|
||||
use std::sync::atomic::{AtomicI32, Ordering};
|
||||
use std::{fs, io};
|
||||
@@ -382,14 +382,6 @@ impl MagiskD {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_log_pipe(&self) -> RawFd {
|
||||
self.logd
|
||||
.lock()
|
||||
.unwrap()
|
||||
.as_ref()
|
||||
.map_or(-1, |s| s.as_raw_fd())
|
||||
}
|
||||
|
||||
pub fn close_log_pipe(&self) {
|
||||
*self.logd.lock().unwrap() = None;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user