Remove bogus command line option

(cherry picked from commit 758f9a032ceb7b1d678d897b97a47efbc5b37a7b)
This commit is contained in:
starlet-dx 2024-01-30 19:12:21 +08:00 committed by openeuler-sync-bot
parent 58886543b8
commit 7ef8fad0c0
2 changed files with 42 additions and 2 deletions

View File

@ -0,0 +1,35 @@
From 1b7a1e2cda1da59cee9aea38009663cdaf278487 Mon Sep 17 00:00:00 2001
From: Richard Cochran <richardcochran@gmail.com>
Date: Mon, 25 Mar 2019 06:04:40 -0700
Subject: [PATCH] ptp4l: Remove bogus command line option.
Commit c8107c8d ("config: Add a configuration option for TC mode.")
added a new TC mode. An early version of the patch series included a
new '-t' command line option, but this was dropped considering the
fact that long options are always available. IOW the TC user can
simply add '--clock_type=P2P_TC' to the command line, making the
single dash option redundant.
This patch fixes the misleading usage message by removing the
non-existing option.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
---
ptp4l.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/ptp4l.c b/ptp4l.c
index 9ef8169..d53970f 100644
--- a/ptp4l.c
+++ b/ptp4l.c
@@ -59,7 +59,6 @@ static void usage(char *progname)
" -p [dev] PTP hardware clock device to use, default auto\n"
" (ignored for SOFTWARE/LEGACY HW time stamping)\n"
" -s slave only mode (overrides configuration file)\n"
- " -t transparent clock\n"
" -l [num] set the logging level to 'num'\n"
" -m print messages to stdout\n"
" -q do not print messages to the syslog\n"
--
2.27.0

View File

@ -1,6 +1,6 @@
Name: linuxptp
Version: 2.0
Release: 5
Release: 6
Summary: Linuxptp is an implementation of the Precision Time Protocol (PTP)
Group: System Environment/Base
License: GPLv2+
@ -11,6 +11,8 @@ Source2: ptp4l.service
patch0000: CVE-2021-3571.patch
Patch0001: CVE-2021-3570.patch
# https://github.com/richardcochran/linuxptp/commit/1b7a1e2cda1da59cee9aea38009663cdaf278487
Patch0002: Remove-bogus-command-line-option.patch
BuildRequires: gcc gcc-c++ systemd git net-tools
@ -33,7 +35,7 @@ Help files for %{name}
%prep
%autosetup -n %{name}-%{version}
%autosetup -n %{name}-%{version} -p1
%build
%make_build EXTRA_CFLAGS="$RPM_OPT_FLAGS" \
@ -81,6 +83,9 @@ echo 'OPTIONS="-a -r"' > %{buildroot}%{_sysconfdir}/sysconfig/phc2sys
%{_mandir}/man8/*.8*
%changelog
* Tue Jan 30 2024 yaoxin <yao_xin001@hoperun.com> - 2.0-6
- Remove bogus command line option
* Wed Sep 22 2021 yaoxin <yaoxin30@huawei.com> - 2.0-5
- Fix CVE-2021-3570