add parameter detection
(cherry picked from commit b86f21110880f19a1b23af2e4135ef17f834d7a5)
This commit is contained in:
parent
c95a56accb
commit
a776e1d796
44
0005-add-parameter-detection.patch
Normal file
44
0005-add-parameter-detection.patch
Normal file
@ -0,0 +1,44 @@
|
||||
From a0e5625a256fb55e68f1c83ce997e44017e72358 Mon Sep 17 00:00:00 2001
|
||||
From: fly_1997 <flylove7@outlook.com>
|
||||
Date: Wed, 5 Mar 2025 23:18:09 +0800
|
||||
Subject: [PATCH] add parameter detection
|
||||
|
||||
---
|
||||
src/client/arg_parse.cpp | 10 +++++++++-
|
||||
1 file changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/client/arg_parse.cpp b/src/client/arg_parse.cpp
|
||||
index cb97054..afe95d2 100644
|
||||
--- a/src/client/arg_parse.cpp
|
||||
+++ b/src/client/arg_parse.cpp
|
||||
@@ -81,6 +81,8 @@ int ArgParse::InitCmd(int &cmd, int opt)
|
||||
if (optarg) {
|
||||
SetArg(optarg);
|
||||
}
|
||||
+ } else {
|
||||
+ return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -120,11 +122,17 @@ int ArgParse::Init(int argc, char *argv[])
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
- InitCmd(cmd, opt);
|
||||
+ if (InitCmd(cmd, opt) < 0) {
|
||||
+ return -1;
|
||||
+ }
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
+ for (int i = optind; i < argc; ++i) {
|
||||
+ ArgError("invalid option [" + std::string(argv[i]) + "].");
|
||||
+ return -1;
|
||||
+ }
|
||||
if (help) {
|
||||
PrintHelp();
|
||||
exit(EXIT_SUCCESS);
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: oeAware-manager
|
||||
Version: v2.0.2
|
||||
Release: 2
|
||||
Release: 3
|
||||
Summary: OeAware is a framework for implementing low-load collection, sensing, and tuning on openEuler.
|
||||
License: MulanPSL2
|
||||
URL: https://gitee.com/openeuler/%{name}
|
||||
@ -9,6 +9,7 @@ Patch1: 0001-convert-preload_tune-from-dynamic-library-to-static-.patch
|
||||
Patch2: 0002-add-analysis-tlb-miss-parameter.patch
|
||||
Patch3: 0003-update-numafast-version.patch
|
||||
Patch4: 0004-InfocmdHandler-add-the-display-of-running-status.patch
|
||||
Patch5: 0005-add-parameter-detection.patch
|
||||
|
||||
BuildRequires: cmake make gcc-c++
|
||||
BuildRequires: boost-devel
|
||||
@ -107,6 +108,9 @@ fi
|
||||
%attr(0644, root, root) %{_includedir}/oeaware/data/*.h
|
||||
|
||||
%changelog
|
||||
* Tue Mar 11 2025 fly_1997 <flylove7@outlook.com> -v2.0.2-3
|
||||
- add parameter detection
|
||||
|
||||
* Sat Mar 8 2025 fly_1997 <flylove7@outlook.com> -v2.0.2-2
|
||||
- add analysis tlb parameter
|
||||
- update numafast version
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user