!39 Backport patches to fix unparsed parameters

From: @wenchao-hao 
Reviewed-by: @liuzhiqiang26 
Signed-off-by: @liuzhiqiang26
This commit is contained in:
openeuler-ci-bot 2022-08-13 03:55:36 +00:00 committed by Gitee
commit 425ce36a19
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,12 +1,13 @@
Name: open-isns
Version: 0.101
Release: 1
Release: 2
Summary: The iSNS server and client programs
License: LGPLv2+
URL: https://www.github.com/open-iscsi/open-isns
Source0: https://www.github.com/open-iscsi/open-isns/archive/v%{version}.tar.gz#/open-isns-%{version}.tar.gz
Patch0001: 0001-Do-not-install-isnsd.socket-in-isnsd.service.patch
Patch0002: 0002-isnsadm-Fix-unparse-command-line-options-V-and-r.patch
BuildRequires: gcc systemd automake autoconf make
BuildRequires: openssl-devel systemd-devel
@ -95,6 +96,9 @@ install -p -m 644 isnsd.service %{buildroot}%{_unitdir}/isnsd.service
%{_mandir}/man8/*
%changelog
* Sat Aug 13 2022 Wenchao Hao <haowenchao@huawei.com> - 0.101-2
- Backport patches to fix unparsed parameters
* Tue Nov 16 2021 Wenchao Hao <haowenchao@huawei.com> - 0.101-1
- Update to open-isns-0.101 version