!45 [sync] PR-44: Backport patches to fix unparsed parameters

From: @openeuler-sync-bot 
Reviewed-by: @liuzhiqiang26 
Signed-off-by: @liuzhiqiang26
This commit is contained in:
openeuler-ci-bot 2022-08-13 13:02:53 +00:00 committed by Gitee
commit 96c050bbef
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 44 additions and 1 deletions

View File

@ -0,0 +1,39 @@
From 82fbb3cef309f17a88e44fe9c379d84f9835f39b Mon Sep 17 00:00:00 2001
From: Wenchao Hao <haowenchao@huawei.com>
Date: Tue, 9 Aug 2022 21:52:18 +0800
Subject: [PATCH] isnsadm: Fix unparse command line options "-V" and "-r"
Following error would reported:
root@fedora:# isnsadm -V
isnsadm: invalid option -- 'V'
Error: Unknown option
root@fedora:# isnsadm -r
isnsadm: invalid option -- 'r'
Error: Unknown option
This is because we did not add "V" and "r" to parameter
when calling getopt_long()
Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
---
isnsadm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/isnsadm.c b/isnsadm.c
index 94c705e..0710877 100644
--- a/isnsadm.c
+++ b/isnsadm.c
@@ -97,7 +97,7 @@ main(int argc, char **argv)
isns_security_t *security = NULL;
int c, status;
- while ((c = getopt_long(argc, argv, "46Cc:d:hK:k:ls:", options, NULL)) != -1) {
+ while ((c = getopt_long(argc, argv, "46Cc:d:hK:k:ls:Vr", options, NULL)) != -1) {
switch (c) {
case '4':
opt_af = AF_INET;
--
2.35.3

View File

@ -1,6 +1,6 @@
Name: open-isns
Version: 0.100
Release: 8
Release: 9
Summary: The iSNS server and client programs
License: LGPLv2+
URL: https://www.github.com/open-iscsi/open-isns
@ -11,6 +11,7 @@ Patch2: 0002-Fix-compiler-issue-when-not-in-security-mode.patch
Patch3: 0003-Fix-586-compile-issue-and-remove-Werror.patch
Patch4: 0004-Do-not-install-isnsd.socket-in-isnsd.service.patch
Patch5: 0005-libisns-remove-sighold-and-sigrelse.patch
Patch6: 0006-isnsadm-Fix-unparse-command-line-options-V-and-r.patch
BuildRequires: gcc systemd automake autoconf make
@ -100,6 +101,9 @@ install -p -m 644 isnsd.service %{buildroot}%{_unitdir}/isnsd.service
%{_mandir}/man8/*
%changelog
* Sat Aug 13 2022 Wenchao Hao <haowenchao@huawei.com> - 0.100-9
- Backport patches to fix unparsed parameters
* Mon Sep 27 2021 Wenchao Hao <haowenchao@huawei.com> - 0.100-8
- Noop operations to make it able to sync between different branches