libiscsi:backport one patch to fix iser url scheme parsing

backport one patch to fix iser url scheme parsing

Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
This commit is contained in:
Wenchao Hao 2021-08-17 15:01:01 +08:00
parent 5946e43786
commit 28d6bf0992
2 changed files with 36 additions and 1 deletions

View File

@ -0,0 +1,30 @@
From 6db782bb0ac088cee0f92a8684a2f0a4ab6f8298 Mon Sep 17 00:00:00 2001
From: Han Han <hhan@redhat.com>
Date: Tue, 11 Aug 2020 21:57:12 +0800
Subject: [PATCH 09/22] iscsi-ls: Fix iser url scheme parsing
Libiscsi supports to parse two iscsi url schemes: 'iscsi://' and 'iser://'.
Fix the missing iser parsing, introduced from 12222077.
Signed-off-by: Han Han <hhan@redhat.com>
---
utils/iscsi-ls.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/utils/iscsi-ls.c b/utils/iscsi-ls.c
index 886624f..ba471ad 100644
--- a/utils/iscsi-ls.c
+++ b/utils/iscsi-ls.c
@@ -376,7 +376,8 @@ int main(int argc, char *argv[])
} else if (!strcmp(argv[i], "-U") ||
!strcmp(argv[i], "--url")) {
useurls = 1;
- } else if (!strncmp("iscsi://", argv[i], 8)) {
+ } else if (!strncmp("iscsi://", argv[i], 8) ||
+ !strncmp("iser://", argv[i], 7)) {
url = strdup(argv[i]);
}
}
--
1.8.3.1

View File

@ -1,11 +1,13 @@
Name: libiscsi
Version: 1.19.0
Release: 2
Release: 3
Summary: Client-side library to implement the iSCSI protocol
Recommends: %{name}-utils
License: LGPLv2+ and GPLv2+
URL: https://github.com/sahlberg/%{name}
Patch1: 0001-iscsi-ls-Fix-iser-url-scheme-parsing.patch
Source: https://github.com/sahlberg/%{name}/archive/%{version}.tar.gz
BuildRequires: gcc git
@ -102,6 +104,9 @@ This package contains utilities of %{name} to connect to iSCSI targets
%{_bindir}/iscsi-test-cu
%changelog
* Tue Aug 17 2020 haowenchao <haowenchao@huawei.com> - 1.19.0-3
- backport one patch to fix iser url scheme parsing
* Fri Nov 20 2020 haowenchao <haowenchao@huawei.com> - 1.19.0-2
- Split rpm package to avoid main rpm package CUnit dependency
Previous implement place executable files in main package which leading