mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-10-27 15:20:58 +00:00
Disable exit on error for cmdline_logging
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
pub use const_format;
|
||||
pub use libc;
|
||||
pub use nix;
|
||||
use num_traits::FromPrimitive;
|
||||
|
||||
pub use cstr::{
|
||||
FsPathFollow, StrErr, Utf8CStr, Utf8CStrBuf, Utf8CStrBufArr, Utf8CStrBufRef, Utf8CString,
|
||||
@@ -58,9 +57,6 @@ pub mod ffi {
|
||||
extern "Rust" {
|
||||
#[cxx_name = "log_with_rs"]
|
||||
fn log_from_cxx(level: LogLevelCxx, msg: Utf8CStrRef);
|
||||
#[cxx_name = "set_log_level_state"]
|
||||
fn set_log_level_state_cxx(level: LogLevelCxx, enabled: bool);
|
||||
fn exit_on_error(b: bool);
|
||||
fn cmdline_logging();
|
||||
fn parse_prop_file_rs(name: Utf8CStrRef, f: &FnBoolStrStr);
|
||||
#[cxx_name = "file_readline"]
|
||||
@@ -78,9 +74,3 @@ pub mod ffi {
|
||||
fn map_fd_for_cxx(fd: i32, sz: usize, rw: bool) -> &'static mut [u8];
|
||||
}
|
||||
}
|
||||
|
||||
fn set_log_level_state_cxx(level: ffi::LogLevelCxx, enabled: bool) {
|
||||
if let Some(level) = LogLevel::from_i32(level.repr) {
|
||||
set_log_level_state(level, enabled)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ pub fn cmdline_logging() {
|
||||
|
||||
let logger = Logger {
|
||||
write: cmdline_write,
|
||||
flags: LogFlag::ExitOnError,
|
||||
flags: 0,
|
||||
};
|
||||
unsafe {
|
||||
LOGGER = logger;
|
||||
|
||||
Reference in New Issue
Block a user