Use const_format for const strings

This commit is contained in:
topjohnwu
2024-03-26 18:03:40 -07:00
parent 21ed095601
commit 1eddbfd72c
8 changed files with 79 additions and 68 deletions
+3 -2
View File
@@ -9,9 +9,10 @@ use base::{
Utf8CStrBufArr, Utf8CStrBufRef, WalkResult,
};
use crate::consts::MAIN_CONFIG;
use crate::ffi::{get_magisk_tmp, CxxMagiskD, RequestCode};
use crate::get_prop;
use crate::logging::magisk_logging;
use crate::{get_prop, MAIN_CONFIG};
// Global magiskd singleton
pub static MAGISKD: OnceLock<MagiskD> = OnceLock::new();
@@ -108,7 +109,7 @@ pub fn daemon_entry() {
let mut buf = Utf8CStrBufArr::<64>::new();
let path = FsPathBuf::new(&mut buf)
.join(get_magisk_tmp())
.join(MAIN_CONFIG!());
.join(MAIN_CONFIG);
let mut is_recovery = false;
if let Ok(file) = path.open(O_RDONLY | O_CLOEXEC) {
let mut file = BufReader::new(file);