From 0fada19d4d88e4eca74bb4cb1dde4321b9831dab Mon Sep 17 00:00:00 2001 From: Chen Haixiang Date: Thu, 5 Dec 2024 08:43:26 +0000 Subject: [PATCH] Rectify improper errors. The error does not affect the actual operation. The level should be adjusted. --- src/sysboostd/daemon.rs | 2 +- src/sysboostd/interface.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sysboostd/daemon.rs b/src/sysboostd/daemon.rs index 966431b..6664fa8 100644 --- a/src/sysboostd/daemon.rs +++ b/src/sysboostd/daemon.rs @@ -116,7 +116,7 @@ fn clean_last_rto() { let real_path = match fs::canonicalize(&p) { Ok(p) => p, Err(e) => { - log::error!("get realpath failed: {}", e); + log::warn!("get realpath failed: {}", e); continue; } }; diff --git a/src/sysboostd/interface.rs b/src/sysboostd/interface.rs index 23392ca..d3ef53c 100644 --- a/src/sysboostd/interface.rs +++ b/src/sysboostd/interface.rs @@ -38,7 +38,7 @@ pub fn write_back_config(name: &str) -> i32 { pub fn delete_one_record(name: &str) -> i32 { let exist = Path::new(&OPTIMIZED_ELF_LOG).exists(); if !exist { - return -1; + return 0; } let file_name = Path::new(&OPTIMIZED_ELF_LOG); let rfile = match OpenOptions::new().read(true).open(file_name) { -- Gitee