diff --git a/0003-Modify-unreasonable-return-values-and-error-messages.patch b/0003-Modify-unreasonable-return-values-and-error-messages.patch new file mode 100644 index 0000000000000000000000000000000000000000..077d45d80895dcb45ea93533abf655f503b9ca28 --- /dev/null +++ b/0003-Modify-unreasonable-return-values-and-error-messages.patch @@ -0,0 +1,67 @@ +From 400ffa7a26d519a62b4ccbd252f3cf8882854def Mon Sep 17 00:00:00 2001 +From: Chen Haixiang +Date: Tue, 11 Mar 2025 08:11:30 +0000 +Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=8D=E5=90=88=E7=90=86?= + =?UTF-8?q?=E7=9A=84=E8=BF=94=E5=9B=9E=E5=80=BC=E4=B8=8E=E6=8A=A5=E9=94=99?= + =?UTF-8?q?=E4=BF=A1=E6=81=AF?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +--- + src/sysboostd/config.rs | 2 +- + src/sysboostd/daemon.rs | 4 ++-- + src/sysboostd/main.rs | 2 +- + 3 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/sysboostd/config.rs b/src/sysboostd/config.rs +index ba197bf..d99862e 100644 +--- a/src/sysboostd/config.rs ++++ b/src/sysboostd/config.rs +@@ -112,7 +112,7 @@ pub fn parse_sysinit_config() { + let conf_file = match Ini::load_from_file(SYSBOOST_CONFIG_PATH){ + Ok(c) => {c} + Err(e) => { +- log::info!("load file {} error: {}",SYSBOOST_CONFIG_PATH, e); ++ log::info!("load file {} failed",SYSBOOST_CONFIG_PATH); + return; + } + }; +diff --git a/src/sysboostd/daemon.rs b/src/sysboostd/daemon.rs +index 6664fa8..73b1b4e 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::warn!("get realpath failed: {}", e); ++ log::info!("get realpath failed: {}", e.kind()); + continue; + } + }; +@@ -189,7 +189,7 @@ fn start_service() { + let mut inotify = Inotify::init().unwrap(); + match inotify.add_watch(SYSBOOST_CONFIG_PATH, WatchMask::MODIFY) { + Err(e) => { +- log::info!("watch init file failed {}", e); ++ log::info!("watch init file failed: {}", e.kind()); + } + _ => {} + }; +diff --git a/src/sysboostd/main.rs b/src/sysboostd/main.rs +index f1abbb2..08b89eb 100644 +--- a/src/sysboostd/main.rs ++++ b/src/sysboostd/main.rs +@@ -147,7 +147,7 @@ fn main() { + profile_path = PROFILE_PATH_DEFAULT; + } + let ret = gen_bolt_optimize_bin(bolt_elf_name, bolt_option, profile_path, bolt_dir); +- if ret < 0 { ++ if ret != 0 { + std::process::exit(-1); + } + std::process::exit(write_back_config(bolt_elf_name)); +-- +2.43.0 + diff --git a/sysboost.spec b/sysboost.spec index 1adeac101d107e0f4d9e26a3314a7c19c880815b..d6ef5c7205b5fe84ad2f8186d4f23174f5144cfd 100644 --- a/sysboost.spec +++ b/sysboost.spec @@ -3,7 +3,7 @@ %global __cargo_common_opts %{?__cargo_common_opts} --all Name: sysboost Version: 1.0.5 -Release: 3 +Release: 4 Summary: Sysboost Rpm Build License: Mulan PSL v2 URL: https://gitee.com/openeuler/sysboost @@ -22,6 +22,7 @@ BuildRequires: kernel-devel Patch0001: 0001-bolt-bolt-dir.patch Patch0002: 0002-sysboot_loader-6.6.patch +Patch0003: 0003-Modify-unreasonable-return-values-and-error-messages.patch %description sysboost can merge ELF files to improve performance. @@ -118,6 +119,9 @@ popd %endif %changelog +* Wed Mar 12 2025 chenhaixiang - 1.0.5-4 +- Desc: Modify unreasonable return values and error messages + * Tue Feb 18 2025 chenhaixiang - 1.0.5-3 - Desc: init 25.03-LTS