Do not go through magiskd for getting the log pipe

This commit is contained in:
topjohnwu
2023-11-01 02:01:18 -07:00
parent c81d7ff76c
commit da766f2a4e
6 changed files with 73 additions and 98 deletions
+1 -7
View File
@@ -5,7 +5,7 @@ use std::sync::{Mutex, OnceLock};
use base::{cstr, Directory, ResultExt, Utf8CStr, Utf8CStrBuf, Utf8CStrBufRef, WalkResult};
use crate::get_prop;
use crate::logging::{magisk_logging, zygisk_logging};
use crate::logging::magisk_logging;
// Global magiskd singleton
pub static MAGISKD: OnceLock<MagiskD> = OnceLock::new();
@@ -50,12 +50,6 @@ pub fn daemon_entry() {
magisk_logging();
}
pub fn zygisk_entry() {
let magiskd = MagiskD::default();
MAGISKD.set(magiskd).ok();
zygisk_logging();
}
pub fn get_magiskd() -> &'static MagiskD {
unsafe { MAGISKD.get().unwrap_unchecked() }
}