!4 命令行添加帮助选项

From: @lvgenggeng 
Reviewed-by: @overweight 
Signed-off-by: @overweight
This commit is contained in:
openeuler-ci-bot 2022-03-31 02:39:44 +00:00 committed by Gitee
commit 60fcab5666
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 21 additions and 1 deletions

13
add-help-opt.patch Normal file
View File

@ -0,0 +1,13 @@
diff --git a/src/time.c b/src/time.c
index 7e07995..231e8cb 100644
--- a/src/time.c
+++ b/src/time.c
@@ -657,7 +657,7 @@ getargs (argc, argv)
if (format)
output_format = format;
- while ((optc = getopt_long (argc, argv, "+af:o:pqvV", longopts, (int *) 0))
+ while ((optc = getopt_long (argc, argv, "+af:ho:pqvV", longopts, (int *) 0))
!= EOF)
{
switch (optc)

View File

@ -1,10 +1,11 @@
Name: time
Version: 1.9
Release: 7
Release: 8
Summary: Monitoring the system resources used by running program
License: GPLv3+ and GFDL
URL: http://www.gnu.org/software/%{name}/
Source0: ftp://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz
Patch0: add-help-opt.patch
BuildRequires: autoconf automake bash coreutils gcc make texinfo sed
@ -39,6 +40,12 @@ make check %{?_smp_mflags}
%{_infodir}/time.info*
%changelog
* Tue Mar 22 2022 Lv Genggeng <lvgenggeng@uniontech.com> - 1.9-8
- Type: enhancement
- ID: NA
- SUG: NA
- DESC: add help opt in cmdline
* Wed Jan 8 2020 openEuler Buildteam <buildteam@openeuler.org> - 1.9-7
- Type: enhancement
- ID: NA