!29 Fix collect2pcp option

From: @ultra_planet
Reviewed-by: @yanzh_h
Signed-off-by: @yanzh_h
This commit is contained in:
openeuler-ci-bot 2020-09-18 11:23:39 +08:00 committed by Gitee
commit ab9e16e5e6
2 changed files with 60 additions and 1 deletions

View File

@ -0,0 +1,54 @@
From 3d2902236c931a8022e5031043853e19484e3530 Mon Sep 17 00:00:00 2001
From: lingsheng <lingsheng@huawei.com>
Date: Fri, 18 Sep 2020 09:47:00 +0800
Subject: [PATCH] Fix collectl2pcp option
---
src/collectl2pcp/collectl2pcp.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/collectl2pcp/collectl2pcp.c b/src/collectl2pcp/collectl2pcp.c
index ceb73c6..ad44558 100644
--- a/src/collectl2pcp/collectl2pcp.c
+++ b/src/collectl2pcp/collectl2pcp.c
@@ -98,7 +98,7 @@ int indom_cnt[NUM_INDOMS];
/* global options */
int vflag;
-int Fflag;
+int fflag;
int kernel_all_hz;
int utc_offset;
@@ -112,7 +112,7 @@ static pmLongOptions longopts[] = {
};
static pmOptions opts = {
- .short_options = "FD:v?",
+ .short_options = "fD:v?",
.long_options = longopts,
.short_usage = "inputfile [inputfile ...] archive\n"
"Each 'inputfile' is a collectl archive, must be for the same host (may be gzipped).\n"
@@ -141,8 +141,8 @@ main(int argc, char *argv[])
while ((c = pmGetOptions(argc, argv, &opts)) != EOF) {
switch (c) {
- case 'F':
- Fflag = 1;
+ case 'f':
+ fflag = 1;
break;
case 'v':
vflag++;
@@ -166,7 +166,7 @@ main(int argc, char *argv[])
exit(1);
}
- if (Fflag) {
+ if (fflag) {
pmsprintf(buf, BUFSIZE, "%s.meta", archive); unlink(buf);
pmsprintf(buf, BUFSIZE, "%s.index", archive); unlink(buf);
for (j=0;; j++) {
--
2.23.0

View File

@ -9,7 +9,7 @@
Name: pcp Name: pcp
Version: 4.1.3 Version: 4.1.3
Summary: System-level performance monitoring and performance management Summary: System-level performance monitoring and performance management
Release: 10 Release: 11
License: GPLv2+ and LGPLv2.1+ and CC-BY License: GPLv2+ and LGPLv2.1+ and CC-BY
URL: https://pcp.io URL: https://pcp.io
Source0: https://dl.bintray.com/pcp/source/pcp-4.1.3.tar.gz Source0: https://dl.bintray.com/pcp/source/pcp-4.1.3.tar.gz
@ -18,6 +18,7 @@ Source2: https://github.com/performancecopilot/pcp-webapp-grafana/archi
Source3: https://github.com/performancecopilot/pcp-webapp-graphite/archive/0.9.10/pcp-webapp-graphite-0.9.10.tar.gz Source3: https://github.com/performancecopilot/pcp-webapp-graphite/archive/0.9.10/pcp-webapp-graphite-0.9.10.tar.gz
Source4: https://github.com/performancecopilot/pcp-webapp-blinkenlights/archive/1.0.1/pcp-webapp-blinkenlights-1.0.1.tar.gz Source4: https://github.com/performancecopilot/pcp-webapp-blinkenlights/archive/1.0.1/pcp-webapp-blinkenlights-1.0.1.tar.gz
Patch0000: 0000-Fix-some-options-and-syntax-errors.patch Patch0000: 0000-Fix-some-options-and-syntax-errors.patch
Patch0001: 0001-Fix-collectl2pcp-option.patch
Patch6000: CVE-2019-3695-CVE-2019-3696.patch Patch6000: CVE-2019-3695-CVE-2019-3696.patch
Patch9000: 9000-fix-new-function-not-found-when-Install.patch Patch9000: 9000-fix-new-function-not-found-when-Install.patch
@ -862,6 +863,7 @@ This package installs selinux support files for PCP.
%setup -q -T -D -a 4 -c -n blinkenlights %setup -q -T -D -a 4 -c -n blinkenlights
%setup -q %setup -q
%patch0000 -p1 %patch0000 -p1
%patch0001 -p1
%patch6000 -p1 %patch6000 -p1
%patch9000 -p1 %patch9000 -p1
@ -2219,6 +2221,9 @@ fi
%config(noreplace) /etc/pcp/pmrep/* %config(noreplace) /etc/pcp/pmrep/*
%changelog %changelog
* Thu Sep 17 2020 lingsheng <lingsheng@huawei.com> - 4.1.3-11
- Fix collect2pcp option
* Thu Sep 16 2020 zhangjiapeng <zhangjiapeng9@huawei.com> - 4.1.3-10 * Thu Sep 16 2020 zhangjiapeng <zhangjiapeng9@huawei.com> - 4.1.3-10
- Fix some options and syntax errors - Fix some options and syntax errors