From 5caf28d27cb3751cb5b10203778333bcd7c7d367 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Thu, 21 Aug 2025 20:01:19 -0700 Subject: [PATCH] Hide harmless error reporting --- native/src/core/daemon.rs | 2 +- native/src/core/module.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/native/src/core/daemon.rs b/native/src/core/daemon.rs index 16407f89e..f68c55d92 100644 --- a/native/src/core/daemon.rs +++ b/native/src/core/daemon.rs @@ -307,7 +307,7 @@ pub fn daemon_entry() { // Remove all pre-init overlay files to free-up memory tmp_path.append_path(ROOTOVL); - tmp_path.remove_all().log_ok(); + tmp_path.remove_all().ok(); tmp_path.truncate(magisk_tmp.len()); let magiskd = MagiskD { diff --git a/native/src/core/module.rs b/native/src/core/module.rs index 7c32e68c1..40a131f7b 100644 --- a/native/src/core/module.rs +++ b/native/src/core/module.rs @@ -4,8 +4,8 @@ use crate::ffi::{ModuleInfo, exec_module_scripts, exec_script, get_magisk_tmp, l use crate::mount::setup_module_mount; use base::{ DirEntry, Directory, FsPathBuilder, LibcReturn, LoggedResult, OsResultStatic, ResultExt, - Utf8CStr, Utf8CStrBuf, Utf8CString, WalkResult, clone_attr, cstr, debug, error, info, libc, - raw_cstr, warn, + SilentResultExt, Utf8CStr, Utf8CStrBuf, Utf8CString, WalkResult, clone_attr, cstr, debug, + error, info, libc, raw_cstr, warn, }; use libc::{AT_REMOVEDIR, MS_RDONLY, O_CLOEXEC, O_CREAT, O_RDONLY}; use std::collections::BTreeMap; @@ -556,7 +556,7 @@ fn inject_zygisk_bins(name: &str, system: &mut FsNode) { } fn upgrade_modules() -> LoggedResult<()> { - let mut upgrade = Directory::open(cstr!(MODULEUPGRADE))?; + let mut upgrade = Directory::open(cstr!(MODULEUPGRADE)).silent()?; let ufd = upgrade.as_raw_fd(); let root = Directory::open(cstr!(MODULEROOT))?; while let Some(e) = upgrade.read()? {