libiscsi:backport one patch to fix iser url scheme parsing

backport one patch to fix iser url scheme parsing

Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
This commit is contained in:
Zhiqiang Liu 2020-10-29 19:03:41 +08:00
parent b89f0af9b5
commit a594244626
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,10 +1,12 @@
Name: libiscsi Name: libiscsi
Version: 1.19.0 Version: 1.19.0
Release: 1 Release: 2
Summary: Client-side library to implement the iSCSI protocol Summary: Client-side library to implement the iSCSI protocol
License: LGPLv2+ and GPLv2+ License: LGPLv2+ and GPLv2+
URL: https://github.com/sahlberg/%{name} 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 Source: https://github.com/sahlberg/%{name}/archive/%{version}.tar.gz
BuildRequires: gcc git BuildRequires: gcc git
@ -95,6 +97,9 @@ This package contains the help info for %{name}.
%{_mandir}/man1/iscsi-test-cu.1.gz %{_mandir}/man1/iscsi-test-cu.1.gz
%changelog %changelog
* Thu Oct 29 2020 Zhiqiang Liu <lzhq28@mail.ustc.edu.cn> - 1.19.0-2
- backport one patch to fix iser url scheme parsing
* Wed Jul 15 2020 Zhiqiang Liu <lzhq28@mail.ustc.edu.cn> - 1.19.0-1 * Wed Jul 15 2020 Zhiqiang Liu <lzhq28@mail.ustc.edu.cn> - 1.19.0-1
- update to v1.19.0 version - update to v1.19.0 version