From 3836009d186aeb478e173cf573569c886763ec23 Mon Sep 17 00:00:00 2001 From: yuncang123 <1050706328@qq.com> Date: Fri, 6 Sep 2024 00:44:46 +0800 Subject: [PATCH 01/28] backport(fix missing underline in iscsid_req.h);fix implicit truncation from int to one-bit;separate compiler options and linker options and add -Wno-error options to support clang build --- ...ix-missing-underline-in-iscsid_req.h.patch | 25 +++++++++++++++++++ ...licit-truncation-from-int-to-one-bit.patch | 25 +++++++++++++++++++ open-iscsi.spec | 14 ++++++++++- 3 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 0029-backport-fix-missing-underline-in-iscsid_req.h.patch create mode 100644 0030-fix-implicit-truncation-from-int-to-one-bit.patch diff --git a/0029-backport-fix-missing-underline-in-iscsid_req.h.patch b/0029-backport-fix-missing-underline-in-iscsid_req.h.patch new file mode 100644 index 0000000..d414834 --- /dev/null +++ b/0029-backport-fix-missing-underline-in-iscsid_req.h.patch @@ -0,0 +1,25 @@ +From edf9debf9764eb5173c744d51c42b973a77f636f Mon Sep 17 00:00:00 2001 +From: yuncang123 <1050706328@qq.com> +Date: Thu, 5 Sep 2024 19:45:09 +0800 +Subject: [PATCH] backport fix missing underline in iscsid_req.h + +--- + usr/iscsid_req.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/usr/iscsid_req.h b/usr/iscsid_req.h +index d580ed2..27d58e1 100644 +--- a/usr/iscsid_req.h ++++ b/usr/iscsid_req.h +@@ -19,7 +19,7 @@ + */ + + #ifndef ISCSID_REQ_H_ +-#define ISCSID_REQ_H ++#define ISCSID_REQ_H_ + + #define ISCSID_REQ_TIMEOUT 1000 + +-- +2.43.0 + diff --git a/0030-fix-implicit-truncation-from-int-to-one-bit.patch b/0030-fix-implicit-truncation-from-int-to-one-bit.patch new file mode 100644 index 0000000..ed3f202 --- /dev/null +++ b/0030-fix-implicit-truncation-from-int-to-one-bit.patch @@ -0,0 +1,25 @@ +From b1decbab06f79f731b5d2893f52786af7f5a6c9b Mon Sep 17 00:00:00 2001 +From: yuncang123 <1050706328@qq.com> +Date: Fri, 6 Sep 2024 00:34:05 +0800 +Subject: [PATCH] fix implicit truncation from int to a one-bit wide bit-field + +--- + usr/mgmt_ipc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/usr/mgmt_ipc.c b/usr/mgmt_ipc.c +index 054378e..00c0227 100644 +--- a/usr/mgmt_ipc.c ++++ b/usr/mgmt_ipc.c +@@ -501,7 +501,7 @@ void mgmt_ipc_handle(int accept_fd) + return; + } + +- qtask->allocated = 1; ++ qtask->allocated = (unsigned) 1; + qtask->mgmt_ipc_fd = fd; + + if (!mgmt_peeruser(fd, user) || strncmp(user, "root", PEERUSER_MAX)) { +-- +2.43.0 + diff --git a/open-iscsi.spec b/open-iscsi.spec index 7479529..8585bcd 100644 --- a/open-iscsi.spec +++ b/open-iscsi.spec @@ -4,7 +4,7 @@ Name: open-iscsi Version: 2.1.5 -Release: 14 +Release: 15 Summary: ISCSI software initiator daemon and utility programs License: GPLv2+ and BSD URL: http://www.open-iscsi.com @@ -37,6 +37,8 @@ patch25: 0025-iscsid-iscsiuio-fix-OOM-adjustment-377.patch patch26: 0026-iscsid-clear-scanning-thread-s-PR_SET_IO_FLUSHER-fla.patch patch27: 0027-iscsid-stop-connection-for-recovery-if-error-is-not-.patch patch28: 0028-discoveryd-fix-format-overflow-warning-413.patch +patch29: 0029-backport-fix-missing-underline-in-iscsid_req.h.patch +patch30: 0030-fix-implicit-truncation-from-int-to-one-bit.patch BuildRequires: flex bison doxygen kmod-devel systemd-units gcc git isns-utils-devel systemd-devel BuildRequires: autoconf automake libtool libmount-devel openssl-devel pkg-config @@ -91,7 +93,14 @@ This contains man files for the using of %{name}. perl -i -pe 's|^exec_prefix = /$|exec_prefix = %{_exec_prefix}|' Makefile %build +%if "%toolchain"=="clang" +CFLAGS="%{optflags} -DUSE_KMOD -fPIC -Wno-error=unused-command-line-argument -Wno-error=ignored-attributes -Wno-error=unused-but-set-variable -Wno-error=gnu-variable-sized-type-not-at-end" \ +LDFLAGS="%{?__global_ldflags} -lkmod" \ +LIB_DIR=%{_libdir} +%make_build +%else %make_build OPTFLAGS="%{optflags} %{?__global_ldflags} -DUSE_KMOD -lkmod" LIB_DIR=%{_libdir} +%endif %install @@ -163,6 +172,9 @@ fi %{_mandir}/man8/* %changelog +* Thu Sep 5 2024 yuanchao <1050706328@qq.com> - 2.1.5-15 +- backport(fix missing underline in iscsid_req.h);fix implicit truncation from 'int' to a one-bit wide bit-field;separate compiler options and linker options and add -Wno-error options to support clang build + * Tue Feb 20 2024 jiangjianjun - 2.1.5-14 - update open-iscsi.spec -- Gitee From 768a90968e69b3e76d63db940cd0403251d6c0ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=91=E6=B2=A7?= <1050706328@qq.com> Date: Wed, 18 Sep 2024 07:55:39 +0000 Subject: [PATCH 02/28] update open-iscsi.spec. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 云沧 <1050706328@qq.com> --- open-iscsi.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/open-iscsi.spec b/open-iscsi.spec index 8585bcd..1eacaf2 100644 --- a/open-iscsi.spec +++ b/open-iscsi.spec @@ -94,7 +94,7 @@ perl -i -pe 's|^exec_prefix = /$|exec_prefix = %{_exec_prefix}|' Makefile %build %if "%toolchain"=="clang" -CFLAGS="%{optflags} -DUSE_KMOD -fPIC -Wno-error=unused-command-line-argument -Wno-error=ignored-attributes -Wno-error=unused-but-set-variable -Wno-error=gnu-variable-sized-type-not-at-end" \ +CFLAGS="%{optflags} -DUSE_KMOD -Wno-error=unused-command-line-argument" \ LDFLAGS="%{?__global_ldflags} -lkmod" \ LIB_DIR=%{_libdir} %make_build -- Gitee From 98d35ebdbe2e7fc9db2a186c709fb292612469f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=91=E6=B2=A7?= <1050706328@qq.com> Date: Wed, 18 Sep 2024 08:00:08 +0000 Subject: [PATCH 03/28] update open-iscsi.spec. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 云沧 <1050706328@qq.com> --- open-iscsi.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/open-iscsi.spec b/open-iscsi.spec index 1eacaf2..ec86ee8 100644 --- a/open-iscsi.spec +++ b/open-iscsi.spec @@ -38,7 +38,7 @@ patch26: 0026-iscsid-clear-scanning-thread-s-PR_SET_IO_FLUSHER-fla.patch patch27: 0027-iscsid-stop-connection-for-recovery-if-error-is-not-.patch patch28: 0028-discoveryd-fix-format-overflow-warning-413.patch patch29: 0029-backport-fix-missing-underline-in-iscsid_req.h.patch -patch30: 0030-fix-implicit-truncation-from-int-to-one-bit.patch +#patch30: 0030-fix-implicit-truncation-from-int-to-one-bit.patch BuildRequires: flex bison doxygen kmod-devel systemd-units gcc git isns-utils-devel systemd-devel BuildRequires: autoconf automake libtool libmount-devel openssl-devel pkg-config -- Gitee From 78cfb9826a35cefc3721d92e7c5a4c0da3c96d4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=91=E6=B2=A7?= <1050706328@qq.com> Date: Wed, 18 Sep 2024 08:06:54 +0000 Subject: [PATCH 04/28] update open-iscsi.spec. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 云沧 <1050706328@qq.com> --- open-iscsi.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/open-iscsi.spec b/open-iscsi.spec index ec86ee8..0287303 100644 --- a/open-iscsi.spec +++ b/open-iscsi.spec @@ -38,7 +38,6 @@ patch26: 0026-iscsid-clear-scanning-thread-s-PR_SET_IO_FLUSHER-fla.patch patch27: 0027-iscsid-stop-connection-for-recovery-if-error-is-not-.patch patch28: 0028-discoveryd-fix-format-overflow-warning-413.patch patch29: 0029-backport-fix-missing-underline-in-iscsid_req.h.patch -#patch30: 0030-fix-implicit-truncation-from-int-to-one-bit.patch BuildRequires: flex bison doxygen kmod-devel systemd-units gcc git isns-utils-devel systemd-devel BuildRequires: autoconf automake libtool libmount-devel openssl-devel pkg-config -- Gitee From 57f6d7a738e0fd98423040e04eadd594d4b49227 Mon Sep 17 00:00:00 2001 From: yuncang123 <1050706328@qq.com> Date: Wed, 18 Sep 2024 16:31:49 +0800 Subject: [PATCH 05/28] up --- 0001-gnu-variable-sized-type-not-at-end.patch | 62 +++++++++++++++++++ open-iscsi.spec | 1 + 2 files changed, 63 insertions(+) create mode 100644 0001-gnu-variable-sized-type-not-at-end.patch diff --git a/0001-gnu-variable-sized-type-not-at-end.patch b/0001-gnu-variable-sized-type-not-at-end.patch new file mode 100644 index 0000000..365a5ee --- /dev/null +++ b/0001-gnu-variable-sized-type-not-at-end.patch @@ -0,0 +1,62 @@ +From 05bbd8dbd9d694472c16e4b642107ab44f2e784f Mon Sep 17 00:00:00 2001 +From: yuncang123 <1050706328@qq.com> +Date: Wed, 18 Sep 2024 16:29:34 +0800 +Subject: [PATCH] gnu-variable-sized-type-not-at-end + +--- + usr/initiator.h | 4 ++-- + usr/mgmt_ipc.h | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/usr/initiator.h b/usr/initiator.h +index dbf6f2b..fe4bd3c 100644 +--- a/usr/initiator.h ++++ b/usr/initiator.h +@@ -183,12 +183,12 @@ struct iscsi_ev_context { + typedef struct queue_task { + iscsi_conn_t *conn; + iscsiadm_req_t req; +- iscsiadm_rsp_t rsp; + int mgmt_ipc_fd; + int allocated : 1; + /* Newer request types include a + * variable-length payload */ + void *payload; ++ iscsiadm_rsp_t rsp; + } queue_task_t; + + struct iscsi_transport_template; +@@ -250,7 +250,6 @@ typedef struct iscsi_session { + /* connection reopens during recovery */ + int reopen_cnt; + int reopen_max; +- queue_task_t reopen_qtask; + iscsi_session_r_stage_e r_stage; + uint32_t replacement_timeout; + +@@ -264,6 +263,7 @@ typedef struct iscsi_session { + * is complete + */ + queue_task_t *notify_qtask; ++ queue_task_t reopen_qtask; + } iscsi_session_t; + + #define INVALID_SESSION_ID (uint32_t)-1 +diff --git a/usr/mgmt_ipc.h b/usr/mgmt_ipc.h +index 55972ed..25a79a4 100644 +--- a/usr/mgmt_ipc.h ++++ b/usr/mgmt_ipc.h +@@ -92,9 +92,9 @@ typedef struct iscsiadm_rsp { + ISCSI_STATS_CUSTOM_MAX) + struct ipc_msg_getstats { + struct iscsi_uevent ev; +- struct iscsi_stats stats; + char custom[sizeof(struct iscsi_stats_custom) * + ISCSI_STATS_CUSTOM_MAX]; ++ struct iscsi_stats stats; + } getstats; + struct ipc_msg_config { + char var[VALUE_MAXLEN]; +-- +2.43.0 + diff --git a/open-iscsi.spec b/open-iscsi.spec index 0287303..166db5a 100644 --- a/open-iscsi.spec +++ b/open-iscsi.spec @@ -38,6 +38,7 @@ patch26: 0026-iscsid-clear-scanning-thread-s-PR_SET_IO_FLUSHER-fla.patch patch27: 0027-iscsid-stop-connection-for-recovery-if-error-is-not-.patch patch28: 0028-discoveryd-fix-format-overflow-warning-413.patch patch29: 0029-backport-fix-missing-underline-in-iscsid_req.h.patch +patch30: 0001-gnu-variable-sized-type-not-at-end.patch BuildRequires: flex bison doxygen kmod-devel systemd-units gcc git isns-utils-devel systemd-devel BuildRequires: autoconf automake libtool libmount-devel openssl-devel pkg-config -- Gitee From 50d92028d326fed712071e5cafecf4449c3e87ed Mon Sep 17 00:00:00 2001 From: yuncang123 <1050706328@qq.com> Date: Wed, 18 Sep 2024 19:59:01 +0800 Subject: [PATCH 06/28] up --- 0001-32.patch | 31 +++++++++++++++++++++++++++++++ open-iscsi.spec | 3 ++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 0001-32.patch diff --git a/0001-32.patch b/0001-32.patch new file mode 100644 index 0000000..335afb5 --- /dev/null +++ b/0001-32.patch @@ -0,0 +1,31 @@ +From 196b1d86f9b921d89041bda0724897ab60494187 Mon Sep 17 00:00:00 2001 +From: yuncang123 <1050706328@qq.com> +Date: Wed, 18 Sep 2024 19:57:49 +0800 +Subject: [PATCH] 32 + +--- + usr/io.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/usr/io.c b/usr/io.c +index a46c9f8..975369f 100644 +--- a/usr/io.c ++++ b/usr/io.c +@@ -33,12 +33,12 @@ + #include "types.h" + #include "iscsi_proto.h" + #include "iscsi_settings.h" +-#include "initiator.h" ++#include "iface.h" + #include "iscsi_ipc.h" + #include "log.h" + #include "transport.h" + #include "idbm.h" +-#include "iface.h" ++#include "initiator.h" + #include "sysdeps.h" + + #define LOG_CONN_CLOSED(conn) \ +-- +2.43.0 + diff --git a/open-iscsi.spec b/open-iscsi.spec index 166db5a..bbf906f 100644 --- a/open-iscsi.spec +++ b/open-iscsi.spec @@ -38,7 +38,8 @@ patch26: 0026-iscsid-clear-scanning-thread-s-PR_SET_IO_FLUSHER-fla.patch patch27: 0027-iscsid-stop-connection-for-recovery-if-error-is-not-.patch patch28: 0028-discoveryd-fix-format-overflow-warning-413.patch patch29: 0029-backport-fix-missing-underline-in-iscsid_req.h.patch -patch30: 0001-gnu-variable-sized-type-not-at-end.patch +patch30: 0001-gnu-variable-sized-type-not-at-end.patch +patch31: 0001-32.patch BuildRequires: flex bison doxygen kmod-devel systemd-units gcc git isns-utils-devel systemd-devel BuildRequires: autoconf automake libtool libmount-devel openssl-devel pkg-config -- Gitee From 41b88b7cc7e74063836bf7ec713b4451c067c924 Mon Sep 17 00:00:00 2001 From: yuncang123 <1050706328@qq.com> Date: Wed, 18 Sep 2024 20:15:38 +0800 Subject: [PATCH 07/28] up --- 0001-32.patch | 77 ++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 70 insertions(+), 7 deletions(-) diff --git a/0001-32.patch b/0001-32.patch index 335afb5..d209dd1 100644 --- a/0001-32.patch +++ b/0001-32.patch @@ -1,22 +1,85 @@ -From 196b1d86f9b921d89041bda0724897ab60494187 Mon Sep 17 00:00:00 2001 +From 50d69533718f694604185817f2b5e4ab87dc39b0 Mon Sep 17 00:00:00 2001 From: yuncang123 <1050706328@qq.com> -Date: Wed, 18 Sep 2024 19:57:49 +0800 +Date: Wed, 18 Sep 2024 20:13:50 +0800 Subject: [PATCH] 32 --- - usr/io.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + 0001-32.patch | 31 +++++++++++++++++++++++++++++++ + usr/idbm.c | 2 +- + usr/io.c | 4 ++-- + 3 files changed, 34 insertions(+), 3 deletions(-) + create mode 100644 0001-32.patch +diff --git a/0001-32.patch b/0001-32.patch +new file mode 100644 +index 0000000..335afb5 +--- /dev/null ++++ b/0001-32.patch +@@ -0,0 +1,31 @@ ++From 196b1d86f9b921d89041bda0724897ab60494187 Mon Sep 17 00:00:00 2001 ++From: yuncang123 <1050706328@qq.com> ++Date: Wed, 18 Sep 2024 19:57:49 +0800 ++Subject: [PATCH] 32 ++ ++--- ++ usr/io.c | 4 ++-- ++ 1 file changed, 2 insertions(+), 2 deletions(-) ++ ++diff --git a/usr/io.c b/usr/io.c ++index a46c9f8..975369f 100644 ++--- a/usr/io.c +++++ b/usr/io.c ++@@ -33,12 +33,12 @@ ++ #include "types.h" ++ #include "iscsi_proto.h" ++ #include "iscsi_settings.h" ++-#include "initiator.h" +++#include "iface.h" ++ #include "iscsi_ipc.h" ++ #include "log.h" ++ #include "transport.h" ++ #include "idbm.h" ++-#include "iface.h" +++#include "initiator.h" ++ #include "sysdeps.h" ++ ++ #define LOG_CONN_CLOSED(conn) \ ++-- ++2.43.0 ++ +diff --git a/usr/idbm.c b/usr/idbm.c +index e1a9021..5467675 100644 +--- a/usr/idbm.c ++++ b/usr/idbm.c +@@ -32,6 +32,7 @@ + #include + #include + ++#include "iface.h" + #include "idbm.h" + #include "idbm_fields.h" + #include "log.h" +@@ -39,7 +40,6 @@ + #include "iscsi_settings.h" + #include "transport.h" + #include "iscsi_sysfs.h" +-#include "iface.h" + #include "sysdeps.h" + #include "fw_context.h" + #include "iscsi_err.h" diff --git a/usr/io.c b/usr/io.c -index a46c9f8..975369f 100644 +index a46c9f8..2961057 100644 --- a/usr/io.c +++ b/usr/io.c -@@ -33,12 +33,12 @@ +@@ -30,15 +30,15 @@ + #include + #include + ++#include "iface.h" #include "types.h" #include "iscsi_proto.h" #include "iscsi_settings.h" -#include "initiator.h" -+#include "iface.h" #include "iscsi_ipc.h" #include "log.h" #include "transport.h" -- Gitee From c6e1a1e8ebe94031be0c52e391afffbea4709ba9 Mon Sep 17 00:00:00 2001 From: yuncang123 <1050706328@qq.com> Date: Wed, 18 Sep 2024 20:24:09 +0800 Subject: [PATCH 08/28] up --- 0001-32.patch | 114 +++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 99 insertions(+), 15 deletions(-) diff --git a/0001-32.patch b/0001-32.patch index d209dd1..a49204b 100644 --- a/0001-32.patch +++ b/0001-32.patch @@ -1,40 +1,104 @@ -From 50d69533718f694604185817f2b5e4ab87dc39b0 Mon Sep 17 00:00:00 2001 +From a911f8d386d477fdaf2412336038c32d86195be2 Mon Sep 17 00:00:00 2001 From: yuncang123 <1050706328@qq.com> -Date: Wed, 18 Sep 2024 20:13:50 +0800 +Date: Wed, 18 Sep 2024 20:23:40 +0800 Subject: [PATCH] 32 --- - 0001-32.patch | 31 +++++++++++++++++++++++++++++++ - usr/idbm.c | 2 +- - usr/io.c | 4 ++-- - 3 files changed, 34 insertions(+), 3 deletions(-) + 0001-32.patch | 94 +++++++++++++++++++++++++++++++++++++++++++++++ + usr/idbm.c | 2 +- + usr/io.c | 4 +- + usr/iscsi_sysfs.c | 2 +- + 4 files changed, 98 insertions(+), 4 deletions(-) create mode 100644 0001-32.patch diff --git a/0001-32.patch b/0001-32.patch new file mode 100644 -index 0000000..335afb5 +index 0000000..d209dd1 --- /dev/null +++ b/0001-32.patch -@@ -0,0 +1,31 @@ -+From 196b1d86f9b921d89041bda0724897ab60494187 Mon Sep 17 00:00:00 2001 +@@ -0,0 +1,94 @@ ++From 50d69533718f694604185817f2b5e4ab87dc39b0 Mon Sep 17 00:00:00 2001 +From: yuncang123 <1050706328@qq.com> -+Date: Wed, 18 Sep 2024 19:57:49 +0800 ++Date: Wed, 18 Sep 2024 20:13:50 +0800 +Subject: [PATCH] 32 + +--- -+ usr/io.c | 4 ++-- -+ 1 file changed, 2 insertions(+), 2 deletions(-) ++ 0001-32.patch | 31 +++++++++++++++++++++++++++++++ ++ usr/idbm.c | 2 +- ++ usr/io.c | 4 ++-- ++ 3 files changed, 34 insertions(+), 3 deletions(-) ++ create mode 100644 0001-32.patch + ++diff --git a/0001-32.patch b/0001-32.patch ++new file mode 100644 ++index 0000000..335afb5 ++--- /dev/null +++++ b/0001-32.patch ++@@ -0,0 +1,31 @@ +++From 196b1d86f9b921d89041bda0724897ab60494187 Mon Sep 17 00:00:00 2001 +++From: yuncang123 <1050706328@qq.com> +++Date: Wed, 18 Sep 2024 19:57:49 +0800 +++Subject: [PATCH] 32 +++ +++--- +++ usr/io.c | 4 ++-- +++ 1 file changed, 2 insertions(+), 2 deletions(-) +++ +++diff --git a/usr/io.c b/usr/io.c +++index a46c9f8..975369f 100644 +++--- a/usr/io.c ++++++ b/usr/io.c +++@@ -33,12 +33,12 @@ +++ #include "types.h" +++ #include "iscsi_proto.h" +++ #include "iscsi_settings.h" +++-#include "initiator.h" ++++#include "iface.h" +++ #include "iscsi_ipc.h" +++ #include "log.h" +++ #include "transport.h" +++ #include "idbm.h" +++-#include "iface.h" ++++#include "initiator.h" +++ #include "sysdeps.h" +++ +++ #define LOG_CONN_CLOSED(conn) \ +++-- +++2.43.0 +++ ++diff --git a/usr/idbm.c b/usr/idbm.c ++index e1a9021..5467675 100644 ++--- a/usr/idbm.c +++++ b/usr/idbm.c ++@@ -32,6 +32,7 @@ ++ #include ++ #include ++ +++#include "iface.h" ++ #include "idbm.h" ++ #include "idbm_fields.h" ++ #include "log.h" ++@@ -39,7 +40,6 @@ ++ #include "iscsi_settings.h" ++ #include "transport.h" ++ #include "iscsi_sysfs.h" ++-#include "iface.h" ++ #include "sysdeps.h" ++ #include "fw_context.h" ++ #include "iscsi_err.h" +diff --git a/usr/io.c b/usr/io.c -+index a46c9f8..975369f 100644 ++index a46c9f8..2961057 100644 +--- a/usr/io.c ++++ b/usr/io.c -+@@ -33,12 +33,12 @@ ++@@ -30,15 +30,15 @@ ++ #include ++ #include ++ +++#include "iface.h" + #include "types.h" + #include "iscsi_proto.h" + #include "iscsi_settings.h" +-#include "initiator.h" -++#include "iface.h" + #include "iscsi_ipc.h" + #include "log.h" + #include "transport.h" @@ -89,6 +153,26 @@ index a46c9f8..2961057 100644 #include "sysdeps.h" #define LOG_CONN_CLOSED(conn) \ +diff --git a/usr/iscsi_sysfs.c b/usr/iscsi_sysfs.c +index abefde2..73885e8 100644 +--- a/usr/iscsi_sysfs.c ++++ b/usr/iscsi_sysfs.c +@@ -26,6 +26,7 @@ + #include + #include + ++#include "iface.h" + #include "log.h" + #include "initiator.h" + #include "transport.h" +@@ -35,7 +36,6 @@ + #include "iscsi_sysfs.h" + #include "sysdeps.h" + #include "iscsi_settings.h" +-#include "iface.h" + #include "session_info.h" + #include "host.h" + #include "iscsi_err.h" -- 2.43.0 -- Gitee From 14909f774851cff0f12cb60d0585c8f0268bed69 Mon Sep 17 00:00:00 2001 From: yuncang123 <1050706328@qq.com> Date: Wed, 18 Sep 2024 20:41:22 +0800 Subject: [PATCH 09/28] up --- 0001-32.patch | 153 ++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 129 insertions(+), 24 deletions(-) diff --git a/0001-32.patch b/0001-32.patch index a49204b..32207b2 100644 --- a/0001-32.patch +++ b/0001-32.patch @@ -1,59 +1,124 @@ -From a911f8d386d477fdaf2412336038c32d86195be2 Mon Sep 17 00:00:00 2001 +From 83f42a6e2ac83f65b3dded0c3d6518abf4edde99 Mon Sep 17 00:00:00 2001 From: yuncang123 <1050706328@qq.com> -Date: Wed, 18 Sep 2024 20:23:40 +0800 +Date: Wed, 18 Sep 2024 20:40:58 +0800 Subject: [PATCH] 32 --- - 0001-32.patch | 94 +++++++++++++++++++++++++++++++++++++++++++++++ - usr/idbm.c | 2 +- - usr/io.c | 4 +- - usr/iscsi_sysfs.c | 2 +- - 4 files changed, 98 insertions(+), 4 deletions(-) + 0001-32.patch | 178 +++++++++++++++++++++++++++++++++++++++++ + usr/idbm.c | 2 +- + usr/initiator_common.c | 2 +- + usr/io.c | 4 +- + usr/iscsi_sysfs.c | 2 +- + 5 files changed, 183 insertions(+), 5 deletions(-) create mode 100644 0001-32.patch diff --git a/0001-32.patch b/0001-32.patch new file mode 100644 -index 0000000..d209dd1 +index 0000000..a49204b --- /dev/null +++ b/0001-32.patch -@@ -0,0 +1,94 @@ -+From 50d69533718f694604185817f2b5e4ab87dc39b0 Mon Sep 17 00:00:00 2001 +@@ -0,0 +1,178 @@ ++From a911f8d386d477fdaf2412336038c32d86195be2 Mon Sep 17 00:00:00 2001 +From: yuncang123 <1050706328@qq.com> -+Date: Wed, 18 Sep 2024 20:13:50 +0800 ++Date: Wed, 18 Sep 2024 20:23:40 +0800 +Subject: [PATCH] 32 + +--- -+ 0001-32.patch | 31 +++++++++++++++++++++++++++++++ -+ usr/idbm.c | 2 +- -+ usr/io.c | 4 ++-- -+ 3 files changed, 34 insertions(+), 3 deletions(-) ++ 0001-32.patch | 94 +++++++++++++++++++++++++++++++++++++++++++++++ ++ usr/idbm.c | 2 +- ++ usr/io.c | 4 +- ++ usr/iscsi_sysfs.c | 2 +- ++ 4 files changed, 98 insertions(+), 4 deletions(-) + create mode 100644 0001-32.patch + +diff --git a/0001-32.patch b/0001-32.patch +new file mode 100644 -+index 0000000..335afb5 ++index 0000000..d209dd1 +--- /dev/null ++++ b/0001-32.patch -+@@ -0,0 +1,31 @@ -++From 196b1d86f9b921d89041bda0724897ab60494187 Mon Sep 17 00:00:00 2001 ++@@ -0,0 +1,94 @@ +++From 50d69533718f694604185817f2b5e4ab87dc39b0 Mon Sep 17 00:00:00 2001 ++From: yuncang123 <1050706328@qq.com> -++Date: Wed, 18 Sep 2024 19:57:49 +0800 +++Date: Wed, 18 Sep 2024 20:13:50 +0800 ++Subject: [PATCH] 32 ++ ++--- -++ usr/io.c | 4 ++-- -++ 1 file changed, 2 insertions(+), 2 deletions(-) +++ 0001-32.patch | 31 +++++++++++++++++++++++++++++++ +++ usr/idbm.c | 2 +- +++ usr/io.c | 4 ++-- +++ 3 files changed, 34 insertions(+), 3 deletions(-) +++ create mode 100644 0001-32.patch ++ +++diff --git a/0001-32.patch b/0001-32.patch +++new file mode 100644 +++index 0000000..335afb5 +++--- /dev/null ++++++ b/0001-32.patch +++@@ -0,0 +1,31 @@ ++++From 196b1d86f9b921d89041bda0724897ab60494187 Mon Sep 17 00:00:00 2001 ++++From: yuncang123 <1050706328@qq.com> ++++Date: Wed, 18 Sep 2024 19:57:49 +0800 ++++Subject: [PATCH] 32 ++++ ++++--- ++++ usr/io.c | 4 ++-- ++++ 1 file changed, 2 insertions(+), 2 deletions(-) ++++ ++++diff --git a/usr/io.c b/usr/io.c ++++index a46c9f8..975369f 100644 ++++--- a/usr/io.c +++++++ b/usr/io.c ++++@@ -33,12 +33,12 @@ ++++ #include "types.h" ++++ #include "iscsi_proto.h" ++++ #include "iscsi_settings.h" ++++-#include "initiator.h" +++++#include "iface.h" ++++ #include "iscsi_ipc.h" ++++ #include "log.h" ++++ #include "transport.h" ++++ #include "idbm.h" ++++-#include "iface.h" +++++#include "initiator.h" ++++ #include "sysdeps.h" ++++ ++++ #define LOG_CONN_CLOSED(conn) \ ++++-- ++++2.43.0 ++++ +++diff --git a/usr/idbm.c b/usr/idbm.c +++index e1a9021..5467675 100644 +++--- a/usr/idbm.c ++++++ b/usr/idbm.c +++@@ -32,6 +32,7 @@ +++ #include +++ #include +++ ++++#include "iface.h" +++ #include "idbm.h" +++ #include "idbm_fields.h" +++ #include "log.h" +++@@ -39,7 +40,6 @@ +++ #include "iscsi_settings.h" +++ #include "transport.h" +++ #include "iscsi_sysfs.h" +++-#include "iface.h" +++ #include "sysdeps.h" +++ #include "fw_context.h" +++ #include "iscsi_err.h" ++diff --git a/usr/io.c b/usr/io.c -++index a46c9f8..975369f 100644 +++index a46c9f8..2961057 100644 ++--- a/usr/io.c +++++ b/usr/io.c -++@@ -33,12 +33,12 @@ +++@@ -30,15 +30,15 @@ +++ #include +++ #include +++ ++++#include "iface.h" ++ #include "types.h" ++ #include "iscsi_proto.h" ++ #include "iscsi_settings.h" ++-#include "initiator.h" -+++#include "iface.h" ++ #include "iscsi_ipc.h" ++ #include "log.h" ++ #include "transport.h" @@ -108,6 +173,26 @@ index 0000000..d209dd1 + #include "sysdeps.h" + + #define LOG_CONN_CLOSED(conn) \ ++diff --git a/usr/iscsi_sysfs.c b/usr/iscsi_sysfs.c ++index abefde2..73885e8 100644 ++--- a/usr/iscsi_sysfs.c +++++ b/usr/iscsi_sysfs.c ++@@ -26,6 +26,7 @@ ++ #include ++ #include ++ +++#include "iface.h" ++ #include "log.h" ++ #include "initiator.h" ++ #include "transport.h" ++@@ -35,7 +36,6 @@ ++ #include "iscsi_sysfs.h" ++ #include "sysdeps.h" ++ #include "iscsi_settings.h" ++-#include "iface.h" ++ #include "session_info.h" ++ #include "host.h" ++ #include "iscsi_err.h" +-- +2.43.0 + @@ -131,6 +216,26 @@ index e1a9021..5467675 100644 #include "sysdeps.h" #include "fw_context.h" #include "iscsi_err.h" +diff --git a/usr/initiator_common.c b/usr/initiator_common.c +index 6cf26c1..4387175 100644 +--- a/usr/initiator_common.c ++++ b/usr/initiator_common.c +@@ -26,6 +26,7 @@ + #include + #include + ++#include "iface.h" + #include "initiator.h" + #include "transport.h" + #include "iscsid.h" +@@ -33,7 +34,6 @@ + #include "log.h" + #include "iscsi_sysfs.h" + #include "iscsi_settings.h" +-#include "iface.h" + #include "host.h" + #include "sysdeps.h" + #include "iscsi_err.h" diff --git a/usr/io.c b/usr/io.c index a46c9f8..2961057 100644 --- a/usr/io.c -- Gitee From 11ef46c8d3fe5cd0f2a79a07604b6fd3f26093fc Mon Sep 17 00:00:00 2001 From: yuncang123 <1050706328@qq.com> Date: Wed, 18 Sep 2024 20:47:02 +0800 Subject: [PATCH 10/28] up --- 0001-32.patch | 186 ++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 156 insertions(+), 30 deletions(-) diff --git a/0001-32.patch b/0001-32.patch index 32207b2..38705bc 100644 --- a/0001-32.patch +++ b/0001-32.patch @@ -1,79 +1,145 @@ -From 83f42a6e2ac83f65b3dded0c3d6518abf4edde99 Mon Sep 17 00:00:00 2001 +From a4964207d8734d6c222991a9502e96fb1ea83a22 Mon Sep 17 00:00:00 2001 From: yuncang123 <1050706328@qq.com> -Date: Wed, 18 Sep 2024 20:40:58 +0800 +Date: Wed, 18 Sep 2024 20:46:10 +0800 Subject: [PATCH] 32 --- - 0001-32.patch | 178 +++++++++++++++++++++++++++++++++++++++++ + 0001-32.patch | 283 +++++++++++++++++++++++++++++++++++++++++ usr/idbm.c | 2 +- + usr/initiator.c | 2 +- usr/initiator_common.c | 2 +- usr/io.c | 4 +- usr/iscsi_sysfs.c | 2 +- - 5 files changed, 183 insertions(+), 5 deletions(-) + 6 files changed, 289 insertions(+), 6 deletions(-) create mode 100644 0001-32.patch diff --git a/0001-32.patch b/0001-32.patch new file mode 100644 -index 0000000..a49204b +index 0000000..32207b2 --- /dev/null +++ b/0001-32.patch -@@ -0,0 +1,178 @@ -+From a911f8d386d477fdaf2412336038c32d86195be2 Mon Sep 17 00:00:00 2001 +@@ -0,0 +1,283 @@ ++From 83f42a6e2ac83f65b3dded0c3d6518abf4edde99 Mon Sep 17 00:00:00 2001 +From: yuncang123 <1050706328@qq.com> -+Date: Wed, 18 Sep 2024 20:23:40 +0800 ++Date: Wed, 18 Sep 2024 20:40:58 +0800 +Subject: [PATCH] 32 + +--- -+ 0001-32.patch | 94 +++++++++++++++++++++++++++++++++++++++++++++++ -+ usr/idbm.c | 2 +- -+ usr/io.c | 4 +- -+ usr/iscsi_sysfs.c | 2 +- -+ 4 files changed, 98 insertions(+), 4 deletions(-) ++ 0001-32.patch | 178 +++++++++++++++++++++++++++++++++++++++++ ++ usr/idbm.c | 2 +- ++ usr/initiator_common.c | 2 +- ++ usr/io.c | 4 +- ++ usr/iscsi_sysfs.c | 2 +- ++ 5 files changed, 183 insertions(+), 5 deletions(-) + create mode 100644 0001-32.patch + +diff --git a/0001-32.patch b/0001-32.patch +new file mode 100644 -+index 0000000..d209dd1 ++index 0000000..a49204b +--- /dev/null ++++ b/0001-32.patch -+@@ -0,0 +1,94 @@ -++From 50d69533718f694604185817f2b5e4ab87dc39b0 Mon Sep 17 00:00:00 2001 ++@@ -0,0 +1,178 @@ +++From a911f8d386d477fdaf2412336038c32d86195be2 Mon Sep 17 00:00:00 2001 ++From: yuncang123 <1050706328@qq.com> -++Date: Wed, 18 Sep 2024 20:13:50 +0800 +++Date: Wed, 18 Sep 2024 20:23:40 +0800 ++Subject: [PATCH] 32 ++ ++--- -++ 0001-32.patch | 31 +++++++++++++++++++++++++++++++ -++ usr/idbm.c | 2 +- -++ usr/io.c | 4 ++-- -++ 3 files changed, 34 insertions(+), 3 deletions(-) +++ 0001-32.patch | 94 +++++++++++++++++++++++++++++++++++++++++++++++ +++ usr/idbm.c | 2 +- +++ usr/io.c | 4 +- +++ usr/iscsi_sysfs.c | 2 +- +++ 4 files changed, 98 insertions(+), 4 deletions(-) ++ create mode 100644 0001-32.patch ++ ++diff --git a/0001-32.patch b/0001-32.patch ++new file mode 100644 -++index 0000000..335afb5 +++index 0000000..d209dd1 ++--- /dev/null +++++ b/0001-32.patch -++@@ -0,0 +1,31 @@ -+++From 196b1d86f9b921d89041bda0724897ab60494187 Mon Sep 17 00:00:00 2001 +++@@ -0,0 +1,94 @@ ++++From 50d69533718f694604185817f2b5e4ab87dc39b0 Mon Sep 17 00:00:00 2001 +++From: yuncang123 <1050706328@qq.com> -+++Date: Wed, 18 Sep 2024 19:57:49 +0800 ++++Date: Wed, 18 Sep 2024 20:13:50 +0800 +++Subject: [PATCH] 32 +++ +++--- -+++ usr/io.c | 4 ++-- -+++ 1 file changed, 2 insertions(+), 2 deletions(-) ++++ 0001-32.patch | 31 +++++++++++++++++++++++++++++++ ++++ usr/idbm.c | 2 +- ++++ usr/io.c | 4 ++-- ++++ 3 files changed, 34 insertions(+), 3 deletions(-) ++++ create mode 100644 0001-32.patch +++ ++++diff --git a/0001-32.patch b/0001-32.patch ++++new file mode 100644 ++++index 0000000..335afb5 ++++--- /dev/null +++++++ b/0001-32.patch ++++@@ -0,0 +1,31 @@ +++++From 196b1d86f9b921d89041bda0724897ab60494187 Mon Sep 17 00:00:00 2001 +++++From: yuncang123 <1050706328@qq.com> +++++Date: Wed, 18 Sep 2024 19:57:49 +0800 +++++Subject: [PATCH] 32 +++++ +++++--- +++++ usr/io.c | 4 ++-- +++++ 1 file changed, 2 insertions(+), 2 deletions(-) +++++ +++++diff --git a/usr/io.c b/usr/io.c +++++index a46c9f8..975369f 100644 +++++--- a/usr/io.c ++++++++ b/usr/io.c +++++@@ -33,12 +33,12 @@ +++++ #include "types.h" +++++ #include "iscsi_proto.h" +++++ #include "iscsi_settings.h" +++++-#include "initiator.h" ++++++#include "iface.h" +++++ #include "iscsi_ipc.h" +++++ #include "log.h" +++++ #include "transport.h" +++++ #include "idbm.h" +++++-#include "iface.h" ++++++#include "initiator.h" +++++ #include "sysdeps.h" +++++ +++++ #define LOG_CONN_CLOSED(conn) \ +++++-- +++++2.43.0 +++++ ++++diff --git a/usr/idbm.c b/usr/idbm.c ++++index e1a9021..5467675 100644 ++++--- a/usr/idbm.c +++++++ b/usr/idbm.c ++++@@ -32,6 +32,7 @@ ++++ #include ++++ #include ++++ +++++#include "iface.h" ++++ #include "idbm.h" ++++ #include "idbm_fields.h" ++++ #include "log.h" ++++@@ -39,7 +40,6 @@ ++++ #include "iscsi_settings.h" ++++ #include "transport.h" ++++ #include "iscsi_sysfs.h" ++++-#include "iface.h" ++++ #include "sysdeps.h" ++++ #include "fw_context.h" ++++ #include "iscsi_err.h" +++diff --git a/usr/io.c b/usr/io.c -+++index a46c9f8..975369f 100644 ++++index a46c9f8..2961057 100644 +++--- a/usr/io.c ++++++ b/usr/io.c -+++@@ -33,12 +33,12 @@ ++++@@ -30,15 +30,15 @@ ++++ #include ++++ #include ++++ +++++#include "iface.h" +++ #include "types.h" +++ #include "iscsi_proto.h" +++ #include "iscsi_settings.h" +++-#include "initiator.h" -++++#include "iface.h" +++ #include "iscsi_ipc.h" +++ #include "log.h" +++ #include "transport.h" @@ -128,6 +194,26 @@ index 0000000..a49204b ++ #include "sysdeps.h" ++ ++ #define LOG_CONN_CLOSED(conn) \ +++diff --git a/usr/iscsi_sysfs.c b/usr/iscsi_sysfs.c +++index abefde2..73885e8 100644 +++--- a/usr/iscsi_sysfs.c ++++++ b/usr/iscsi_sysfs.c +++@@ -26,6 +26,7 @@ +++ #include +++ #include +++ ++++#include "iface.h" +++ #include "log.h" +++ #include "initiator.h" +++ #include "transport.h" +++@@ -35,7 +36,6 @@ +++ #include "iscsi_sysfs.h" +++ #include "sysdeps.h" +++ #include "iscsi_settings.h" +++-#include "iface.h" +++ #include "session_info.h" +++ #include "host.h" +++ #include "iscsi_err.h" ++-- ++2.43.0 ++ @@ -151,6 +237,26 @@ index 0000000..a49204b + #include "sysdeps.h" + #include "fw_context.h" + #include "iscsi_err.h" ++diff --git a/usr/initiator_common.c b/usr/initiator_common.c ++index 6cf26c1..4387175 100644 ++--- a/usr/initiator_common.c +++++ b/usr/initiator_common.c ++@@ -26,6 +26,7 @@ ++ #include ++ #include ++ +++#include "iface.h" ++ #include "initiator.h" ++ #include "transport.h" ++ #include "iscsid.h" ++@@ -33,7 +34,6 @@ ++ #include "log.h" ++ #include "iscsi_sysfs.h" ++ #include "iscsi_settings.h" ++-#include "iface.h" ++ #include "host.h" ++ #include "sysdeps.h" ++ #include "iscsi_err.h" +diff --git a/usr/io.c b/usr/io.c +index a46c9f8..2961057 100644 +--- a/usr/io.c @@ -216,6 +322,26 @@ index e1a9021..5467675 100644 #include "sysdeps.h" #include "fw_context.h" #include "iscsi_err.h" +diff --git a/usr/initiator.c b/usr/initiator.c +index 684647c..5b340fc 100644 +--- a/usr/initiator.c ++++ b/usr/initiator.c +@@ -31,6 +31,7 @@ + #include + #include + ++#include "iface.h" + #include "initiator.h" + #include "transport.h" + #include "iscsid.h" +@@ -44,7 +45,6 @@ + #include "scsi.h" + #include "iscsi_sysfs.h" + #include "iscsi_settings.h" +-#include "iface.h" + #include "host.h" + #include "sysdeps.h" + #include "iscsi_err.h" diff --git a/usr/initiator_common.c b/usr/initiator_common.c index 6cf26c1..4387175 100644 --- a/usr/initiator_common.c -- Gitee From 34417e6643fff00a0d7f7440abf28abf9d66fd31 Mon Sep 17 00:00:00 2001 From: yuncang123 <1050706328@qq.com> Date: Wed, 18 Sep 2024 21:17:17 +0800 Subject: [PATCH 11/28] up --- 0030-fix-implicit-truncation-from-int-to-one-bit.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/0030-fix-implicit-truncation-from-int-to-one-bit.patch b/0030-fix-implicit-truncation-from-int-to-one-bit.patch index ed3f202..696d55b 100644 --- a/0030-fix-implicit-truncation-from-int-to-one-bit.patch +++ b/0030-fix-implicit-truncation-from-int-to-one-bit.patch @@ -16,7 +16,7 @@ index 054378e..00c0227 100644 } - qtask->allocated = 1; -+ qtask->allocated = (unsigned) 1; ++ qtask->allocated = true; qtask->mgmt_ipc_fd = fd; if (!mgmt_peeruser(fd, user) || strncmp(user, "root", PEERUSER_MAX)) { -- Gitee From d560447ce6a46cf8b6ffc9a0213b808b098da63c Mon Sep 17 00:00:00 2001 From: yuncang123 <1050706328@qq.com> Date: Wed, 18 Sep 2024 21:17:46 +0800 Subject: [PATCH 12/28] up --- open-iscsi.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/open-iscsi.spec b/open-iscsi.spec index bbf906f..7e66424 100644 --- a/open-iscsi.spec +++ b/open-iscsi.spec @@ -40,6 +40,7 @@ patch28: 0028-discoveryd-fix-format-overflow-warning-413.patch patch29: 0029-backport-fix-missing-underline-in-iscsid_req.h.patch patch30: 0001-gnu-variable-sized-type-not-at-end.patch patch31: 0001-32.patch +patch32: 0030-fix-implicit-truncation-from-int-to-one-bit.patch BuildRequires: flex bison doxygen kmod-devel systemd-units gcc git isns-utils-devel systemd-devel BuildRequires: autoconf automake libtool libmount-devel openssl-devel pkg-config -- Gitee From 01dd86883523270a7b05492d8d705d475e72cbcb Mon Sep 17 00:00:00 2001 From: yuncang123 <1050706328@qq.com> Date: Wed, 18 Sep 2024 21:39:35 +0800 Subject: [PATCH 13/28] m --- 0001-32.patch | 349 ++++++++------------------------------------------ 1 file changed, 50 insertions(+), 299 deletions(-) diff --git a/0001-32.patch b/0001-32.patch index 38705bc..8aa656d 100644 --- a/0001-32.patch +++ b/0001-32.patch @@ -1,307 +1,38 @@ -From a4964207d8734d6c222991a9502e96fb1ea83a22 Mon Sep 17 00:00:00 2001 +From 7c5541d340bc9bc338f44eb4ac7c53ae4fb03073 Mon Sep 17 00:00:00 2001 From: yuncang123 <1050706328@qq.com> -Date: Wed, 18 Sep 2024 20:46:10 +0800 +Date: Wed, 18 Sep 2024 21:37:02 +0800 Subject: [PATCH] 32 --- - 0001-32.patch | 283 +++++++++++++++++++++++++++++++++++++++++ - usr/idbm.c | 2 +- - usr/initiator.c | 2 +- - usr/initiator_common.c | 2 +- - usr/io.c | 4 +- - usr/iscsi_sysfs.c | 2 +- - 6 files changed, 289 insertions(+), 6 deletions(-) - create mode 100644 0001-32.patch + usr/discovery.c | 2 +- + usr/idbm.c | 2 +- + usr/initiator.c | 2 +- + usr/initiator_common.c | 2 +- + usr/io.c | 4 ++-- + usr/iscsi_sysfs.c | 2 +- + usr/iscsid.c | 2 +- + 7 files changed, 8 insertions(+), 8 deletions(-) -diff --git a/0001-32.patch b/0001-32.patch -new file mode 100644 -index 0000000..32207b2 ---- /dev/null -+++ b/0001-32.patch -@@ -0,0 +1,283 @@ -+From 83f42a6e2ac83f65b3dded0c3d6518abf4edde99 Mon Sep 17 00:00:00 2001 -+From: yuncang123 <1050706328@qq.com> -+Date: Wed, 18 Sep 2024 20:40:58 +0800 -+Subject: [PATCH] 32 -+ -+--- -+ 0001-32.patch | 178 +++++++++++++++++++++++++++++++++++++++++ -+ usr/idbm.c | 2 +- -+ usr/initiator_common.c | 2 +- -+ usr/io.c | 4 +- -+ usr/iscsi_sysfs.c | 2 +- -+ 5 files changed, 183 insertions(+), 5 deletions(-) -+ create mode 100644 0001-32.patch -+ -+diff --git a/0001-32.patch b/0001-32.patch -+new file mode 100644 -+index 0000000..a49204b -+--- /dev/null -++++ b/0001-32.patch -+@@ -0,0 +1,178 @@ -++From a911f8d386d477fdaf2412336038c32d86195be2 Mon Sep 17 00:00:00 2001 -++From: yuncang123 <1050706328@qq.com> -++Date: Wed, 18 Sep 2024 20:23:40 +0800 -++Subject: [PATCH] 32 -++ -++--- -++ 0001-32.patch | 94 +++++++++++++++++++++++++++++++++++++++++++++++ -++ usr/idbm.c | 2 +- -++ usr/io.c | 4 +- -++ usr/iscsi_sysfs.c | 2 +- -++ 4 files changed, 98 insertions(+), 4 deletions(-) -++ create mode 100644 0001-32.patch -++ -++diff --git a/0001-32.patch b/0001-32.patch -++new file mode 100644 -++index 0000000..d209dd1 -++--- /dev/null -+++++ b/0001-32.patch -++@@ -0,0 +1,94 @@ -+++From 50d69533718f694604185817f2b5e4ab87dc39b0 Mon Sep 17 00:00:00 2001 -+++From: yuncang123 <1050706328@qq.com> -+++Date: Wed, 18 Sep 2024 20:13:50 +0800 -+++Subject: [PATCH] 32 -+++ -+++--- -+++ 0001-32.patch | 31 +++++++++++++++++++++++++++++++ -+++ usr/idbm.c | 2 +- -+++ usr/io.c | 4 ++-- -+++ 3 files changed, 34 insertions(+), 3 deletions(-) -+++ create mode 100644 0001-32.patch -+++ -+++diff --git a/0001-32.patch b/0001-32.patch -+++new file mode 100644 -+++index 0000000..335afb5 -+++--- /dev/null -++++++ b/0001-32.patch -+++@@ -0,0 +1,31 @@ -++++From 196b1d86f9b921d89041bda0724897ab60494187 Mon Sep 17 00:00:00 2001 -++++From: yuncang123 <1050706328@qq.com> -++++Date: Wed, 18 Sep 2024 19:57:49 +0800 -++++Subject: [PATCH] 32 -++++ -++++--- -++++ usr/io.c | 4 ++-- -++++ 1 file changed, 2 insertions(+), 2 deletions(-) -++++ -++++diff --git a/usr/io.c b/usr/io.c -++++index a46c9f8..975369f 100644 -++++--- a/usr/io.c -+++++++ b/usr/io.c -++++@@ -33,12 +33,12 @@ -++++ #include "types.h" -++++ #include "iscsi_proto.h" -++++ #include "iscsi_settings.h" -++++-#include "initiator.h" -+++++#include "iface.h" -++++ #include "iscsi_ipc.h" -++++ #include "log.h" -++++ #include "transport.h" -++++ #include "idbm.h" -++++-#include "iface.h" -+++++#include "initiator.h" -++++ #include "sysdeps.h" -++++ -++++ #define LOG_CONN_CLOSED(conn) \ -++++-- -++++2.43.0 -++++ -+++diff --git a/usr/idbm.c b/usr/idbm.c -+++index e1a9021..5467675 100644 -+++--- a/usr/idbm.c -++++++ b/usr/idbm.c -+++@@ -32,6 +32,7 @@ -+++ #include -+++ #include -+++ -++++#include "iface.h" -+++ #include "idbm.h" -+++ #include "idbm_fields.h" -+++ #include "log.h" -+++@@ -39,7 +40,6 @@ -+++ #include "iscsi_settings.h" -+++ #include "transport.h" -+++ #include "iscsi_sysfs.h" -+++-#include "iface.h" -+++ #include "sysdeps.h" -+++ #include "fw_context.h" -+++ #include "iscsi_err.h" -+++diff --git a/usr/io.c b/usr/io.c -+++index a46c9f8..2961057 100644 -+++--- a/usr/io.c -++++++ b/usr/io.c -+++@@ -30,15 +30,15 @@ -+++ #include -+++ #include -+++ -++++#include "iface.h" -+++ #include "types.h" -+++ #include "iscsi_proto.h" -+++ #include "iscsi_settings.h" -+++-#include "initiator.h" -+++ #include "iscsi_ipc.h" -+++ #include "log.h" -+++ #include "transport.h" -+++ #include "idbm.h" -+++-#include "iface.h" -++++#include "initiator.h" -+++ #include "sysdeps.h" -+++ -+++ #define LOG_CONN_CLOSED(conn) \ -+++-- -+++2.43.0 -+++ -++diff --git a/usr/idbm.c b/usr/idbm.c -++index e1a9021..5467675 100644 -++--- a/usr/idbm.c -+++++ b/usr/idbm.c -++@@ -32,6 +32,7 @@ -++ #include -++ #include -++ -+++#include "iface.h" -++ #include "idbm.h" -++ #include "idbm_fields.h" -++ #include "log.h" -++@@ -39,7 +40,6 @@ -++ #include "iscsi_settings.h" -++ #include "transport.h" -++ #include "iscsi_sysfs.h" -++-#include "iface.h" -++ #include "sysdeps.h" -++ #include "fw_context.h" -++ #include "iscsi_err.h" -++diff --git a/usr/io.c b/usr/io.c -++index a46c9f8..2961057 100644 -++--- a/usr/io.c -+++++ b/usr/io.c -++@@ -30,15 +30,15 @@ -++ #include -++ #include -++ -+++#include "iface.h" -++ #include "types.h" -++ #include "iscsi_proto.h" -++ #include "iscsi_settings.h" -++-#include "initiator.h" -++ #include "iscsi_ipc.h" -++ #include "log.h" -++ #include "transport.h" -++ #include "idbm.h" -++-#include "iface.h" -+++#include "initiator.h" -++ #include "sysdeps.h" -++ -++ #define LOG_CONN_CLOSED(conn) \ -++diff --git a/usr/iscsi_sysfs.c b/usr/iscsi_sysfs.c -++index abefde2..73885e8 100644 -++--- a/usr/iscsi_sysfs.c -+++++ b/usr/iscsi_sysfs.c -++@@ -26,6 +26,7 @@ -++ #include -++ #include -++ -+++#include "iface.h" -++ #include "log.h" -++ #include "initiator.h" -++ #include "transport.h" -++@@ -35,7 +36,6 @@ -++ #include "iscsi_sysfs.h" -++ #include "sysdeps.h" -++ #include "iscsi_settings.h" -++-#include "iface.h" -++ #include "session_info.h" -++ #include "host.h" -++ #include "iscsi_err.h" -++-- -++2.43.0 -++ -+diff --git a/usr/idbm.c b/usr/idbm.c -+index e1a9021..5467675 100644 -+--- a/usr/idbm.c -++++ b/usr/idbm.c -+@@ -32,6 +32,7 @@ -+ #include -+ #include -+ -++#include "iface.h" -+ #include "idbm.h" -+ #include "idbm_fields.h" -+ #include "log.h" -+@@ -39,7 +40,6 @@ -+ #include "iscsi_settings.h" -+ #include "transport.h" -+ #include "iscsi_sysfs.h" -+-#include "iface.h" -+ #include "sysdeps.h" -+ #include "fw_context.h" -+ #include "iscsi_err.h" -+diff --git a/usr/initiator_common.c b/usr/initiator_common.c -+index 6cf26c1..4387175 100644 -+--- a/usr/initiator_common.c -++++ b/usr/initiator_common.c -+@@ -26,6 +26,7 @@ -+ #include -+ #include -+ -++#include "iface.h" -+ #include "initiator.h" -+ #include "transport.h" -+ #include "iscsid.h" -+@@ -33,7 +34,6 @@ -+ #include "log.h" -+ #include "iscsi_sysfs.h" -+ #include "iscsi_settings.h" -+-#include "iface.h" -+ #include "host.h" -+ #include "sysdeps.h" -+ #include "iscsi_err.h" -+diff --git a/usr/io.c b/usr/io.c -+index a46c9f8..2961057 100644 -+--- a/usr/io.c -++++ b/usr/io.c -+@@ -30,15 +30,15 @@ -+ #include -+ #include -+ -++#include "iface.h" -+ #include "types.h" -+ #include "iscsi_proto.h" -+ #include "iscsi_settings.h" -+-#include "initiator.h" -+ #include "iscsi_ipc.h" -+ #include "log.h" -+ #include "transport.h" -+ #include "idbm.h" -+-#include "iface.h" -++#include "initiator.h" -+ #include "sysdeps.h" -+ -+ #define LOG_CONN_CLOSED(conn) \ -+diff --git a/usr/iscsi_sysfs.c b/usr/iscsi_sysfs.c -+index abefde2..73885e8 100644 -+--- a/usr/iscsi_sysfs.c -++++ b/usr/iscsi_sysfs.c -+@@ -26,6 +26,7 @@ -+ #include -+ #include -+ -++#include "iface.h" -+ #include "log.h" -+ #include "initiator.h" -+ #include "transport.h" -+@@ -35,7 +36,6 @@ -+ #include "iscsi_sysfs.h" -+ #include "sysdeps.h" -+ #include "iscsi_settings.h" -+-#include "iface.h" -+ #include "session_info.h" -+ #include "host.h" -+ #include "iscsi_err.h" -+-- -+2.43.0 -+ +diff --git a/usr/discovery.c b/usr/discovery.c +index 7dec696..71eb4cd 100644 +--- a/usr/discovery.c ++++ b/usr/discovery.c +@@ -32,6 +32,7 @@ + #include + #include + ++#include "iface.h" + #include "local_strings.h" + #include "types.h" + #include "iscsi_proto.h" +@@ -46,7 +47,6 @@ + #include "transport.h" + #include "iscsi_sysfs.h" + #include "iscsi_ipc.h" +-#include "iface.h" + #include "iscsi_timer.h" + #include "iscsi_err.h" + /* libisns includes */ diff --git a/usr/idbm.c b/usr/idbm.c index e1a9021..5467675 100644 --- a/usr/idbm.c @@ -404,6 +135,26 @@ index abefde2..73885e8 100644 #include "session_info.h" #include "host.h" #include "iscsi_err.h" +diff --git a/usr/iscsid.c b/usr/iscsid.c +index 478c83d..2ad9854 100644 +--- a/usr/iscsid.c ++++ b/usr/iscsid.c +@@ -39,6 +39,7 @@ + #include + #endif + ++#include "iface.h" + #include "iscsid.h" + #include "mgmt_ipc.h" + #include "event_poll.h" +@@ -50,7 +51,6 @@ + #include "idbm.h" + #include "version.h" + #include "iscsi_sysfs.h" +-#include "iface.h" + #include "session_info.h" + #include "sysdeps.h" + #include "discoveryd.h" -- 2.43.0 -- Gitee From b4d21549d7e5c4d6391587a40663fed93730ce90 Mon Sep 17 00:00:00 2001 From: yuncang123 <1050706328@qq.com> Date: Wed, 18 Sep 2024 23:30:25 +0800 Subject: [PATCH 14/28] m --- 0001-rm-unused-but-set-variable.patch | 24 ++++++++++++++++++++++++ open-iscsi.spec | 1 + 2 files changed, 25 insertions(+) create mode 100644 0001-rm-unused-but-set-variable.patch diff --git a/0001-rm-unused-but-set-variable.patch b/0001-rm-unused-but-set-variable.patch new file mode 100644 index 0000000..49331cc --- /dev/null +++ b/0001-rm-unused-but-set-variable.patch @@ -0,0 +1,24 @@ +From 719e83f6a77b1a0fb8458f59e93e0eb76cddc4b9 Mon Sep 17 00:00:00 2001 +From: yuncang123 <1050706328@qq.com> +Date: Wed, 18 Sep 2024 23:28:40 +0800 +Subject: [PATCH] rm-unused-but-set-variable + +--- + usr/discovery.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/usr/discovery.c b/usr/discovery.c +index 7dec696..10e12a2 100644 +--- a/usr/discovery.c ++++ b/usr/discovery.c +@@ -695,7 +695,6 @@ process_sendtargets_response(struct str_buffer *sendtargets, + char *end = text + str_data_length(sendtargets); + char *nul = end - 1; + char *record = NULL; +- int num_targets = 0; + + if (start == end) { + /* no SendTargets data */ +-- +2.43.0 + diff --git a/open-iscsi.spec b/open-iscsi.spec index 7e66424..b9136b6 100644 --- a/open-iscsi.spec +++ b/open-iscsi.spec @@ -41,6 +41,7 @@ patch29: 0029-backport-fix-missing-underline-in-iscsid_req.h.patch patch30: 0001-gnu-variable-sized-type-not-at-end.patch patch31: 0001-32.patch patch32: 0030-fix-implicit-truncation-from-int-to-one-bit.patch +patch33: 0001-rm-unused-but-set-variable.patch BuildRequires: flex bison doxygen kmod-devel systemd-units gcc git isns-utils-devel systemd-devel BuildRequires: autoconf automake libtool libmount-devel openssl-devel pkg-config -- Gitee From 403555f95e9a6096e13bcb314a7ca063f39a0c13 Mon Sep 17 00:00:00 2001 From: yuncang123 <1050706328@qq.com> Date: Wed, 18 Sep 2024 23:35:00 +0800 Subject: [PATCH 15/28] m --- open-iscsi.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/open-iscsi.spec b/open-iscsi.spec index b9136b6..7e66424 100644 --- a/open-iscsi.spec +++ b/open-iscsi.spec @@ -41,7 +41,6 @@ patch29: 0029-backport-fix-missing-underline-in-iscsid_req.h.patch patch30: 0001-gnu-variable-sized-type-not-at-end.patch patch31: 0001-32.patch patch32: 0030-fix-implicit-truncation-from-int-to-one-bit.patch -patch33: 0001-rm-unused-but-set-variable.patch BuildRequires: flex bison doxygen kmod-devel systemd-units gcc git isns-utils-devel systemd-devel BuildRequires: autoconf automake libtool libmount-devel openssl-devel pkg-config -- Gitee From 057fe22ffa824f76ccfdbab8d9f649466ef64980 Mon Sep 17 00:00:00 2001 From: yuncang123 <1050706328@qq.com> Date: Wed, 18 Sep 2024 23:39:38 +0800 Subject: [PATCH 16/28] m --- open-iscsi.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/open-iscsi.spec b/open-iscsi.spec index 7e66424..36d26df 100644 --- a/open-iscsi.spec +++ b/open-iscsi.spec @@ -96,7 +96,7 @@ perl -i -pe 's|^exec_prefix = /$|exec_prefix = %{_exec_prefix}|' Makefile %build %if "%toolchain"=="clang" -CFLAGS="%{optflags} -DUSE_KMOD -Wno-error=unused-command-line-argument" \ +CFLAGS="%{optflags} -DUSE_KMOD -Wno-error=unused-command-line-argument -Wno-error=unused-but-set-variable" \ LDFLAGS="%{?__global_ldflags} -lkmod" \ LIB_DIR=%{_libdir} %make_build -- Gitee From bac1ac9f3278fbd29ae85b5a457a6297f9f69f96 Mon Sep 17 00:00:00 2001 From: yuncang123 <1050706328@qq.com> Date: Wed, 18 Sep 2024 23:43:43 +0800 Subject: [PATCH 17/28] m --- 0001-32.patch | 206 +++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 196 insertions(+), 10 deletions(-) diff --git a/0001-32.patch b/0001-32.patch index 8aa656d..eee7d5e 100644 --- a/0001-32.patch +++ b/0001-32.patch @@ -1,18 +1,187 @@ -From 7c5541d340bc9bc338f44eb4ac7c53ae4fb03073 Mon Sep 17 00:00:00 2001 +From abad555f3efb2fc660f13a3e228ad20f6ca9f73b Mon Sep 17 00:00:00 2001 From: yuncang123 <1050706328@qq.com> -Date: Wed, 18 Sep 2024 21:37:02 +0800 +Date: Wed, 18 Sep 2024 23:43:08 +0800 Subject: [PATCH] 32 --- - usr/discovery.c | 2 +- - usr/idbm.c | 2 +- - usr/initiator.c | 2 +- - usr/initiator_common.c | 2 +- - usr/io.c | 4 ++-- - usr/iscsi_sysfs.c | 2 +- - usr/iscsid.c | 2 +- - 7 files changed, 8 insertions(+), 8 deletions(-) + 0001-32.patch | 160 +++++++++++++++++++++++++++++++++++++++++ + usr/discovery.c | 2 +- + usr/idbm.c | 2 +- + usr/initiator.c | 2 +- + usr/initiator_common.c | 2 +- + usr/io.c | 4 +- + usr/iscsi_sysfs.c | 2 +- + usr/iscsid.c | 2 +- + usr/session_mgmt.c | 2 +- + 9 files changed, 169 insertions(+), 9 deletions(-) + create mode 100644 0001-32.patch +diff --git a/0001-32.patch b/0001-32.patch +new file mode 100644 +index 0000000..8aa656d +--- /dev/null ++++ b/0001-32.patch +@@ -0,0 +1,160 @@ ++From 7c5541d340bc9bc338f44eb4ac7c53ae4fb03073 Mon Sep 17 00:00:00 2001 ++From: yuncang123 <1050706328@qq.com> ++Date: Wed, 18 Sep 2024 21:37:02 +0800 ++Subject: [PATCH] 32 ++ ++--- ++ usr/discovery.c | 2 +- ++ usr/idbm.c | 2 +- ++ usr/initiator.c | 2 +- ++ usr/initiator_common.c | 2 +- ++ usr/io.c | 4 ++-- ++ usr/iscsi_sysfs.c | 2 +- ++ usr/iscsid.c | 2 +- ++ 7 files changed, 8 insertions(+), 8 deletions(-) ++ ++diff --git a/usr/discovery.c b/usr/discovery.c ++index 7dec696..71eb4cd 100644 ++--- a/usr/discovery.c +++++ b/usr/discovery.c ++@@ -32,6 +32,7 @@ ++ #include ++ #include ++ +++#include "iface.h" ++ #include "local_strings.h" ++ #include "types.h" ++ #include "iscsi_proto.h" ++@@ -46,7 +47,6 @@ ++ #include "transport.h" ++ #include "iscsi_sysfs.h" ++ #include "iscsi_ipc.h" ++-#include "iface.h" ++ #include "iscsi_timer.h" ++ #include "iscsi_err.h" ++ /* libisns includes */ ++diff --git a/usr/idbm.c b/usr/idbm.c ++index e1a9021..5467675 100644 ++--- a/usr/idbm.c +++++ b/usr/idbm.c ++@@ -32,6 +32,7 @@ ++ #include ++ #include ++ +++#include "iface.h" ++ #include "idbm.h" ++ #include "idbm_fields.h" ++ #include "log.h" ++@@ -39,7 +40,6 @@ ++ #include "iscsi_settings.h" ++ #include "transport.h" ++ #include "iscsi_sysfs.h" ++-#include "iface.h" ++ #include "sysdeps.h" ++ #include "fw_context.h" ++ #include "iscsi_err.h" ++diff --git a/usr/initiator.c b/usr/initiator.c ++index 684647c..5b340fc 100644 ++--- a/usr/initiator.c +++++ b/usr/initiator.c ++@@ -31,6 +31,7 @@ ++ #include ++ #include ++ +++#include "iface.h" ++ #include "initiator.h" ++ #include "transport.h" ++ #include "iscsid.h" ++@@ -44,7 +45,6 @@ ++ #include "scsi.h" ++ #include "iscsi_sysfs.h" ++ #include "iscsi_settings.h" ++-#include "iface.h" ++ #include "host.h" ++ #include "sysdeps.h" ++ #include "iscsi_err.h" ++diff --git a/usr/initiator_common.c b/usr/initiator_common.c ++index 6cf26c1..4387175 100644 ++--- a/usr/initiator_common.c +++++ b/usr/initiator_common.c ++@@ -26,6 +26,7 @@ ++ #include ++ #include ++ +++#include "iface.h" ++ #include "initiator.h" ++ #include "transport.h" ++ #include "iscsid.h" ++@@ -33,7 +34,6 @@ ++ #include "log.h" ++ #include "iscsi_sysfs.h" ++ #include "iscsi_settings.h" ++-#include "iface.h" ++ #include "host.h" ++ #include "sysdeps.h" ++ #include "iscsi_err.h" ++diff --git a/usr/io.c b/usr/io.c ++index a46c9f8..2961057 100644 ++--- a/usr/io.c +++++ b/usr/io.c ++@@ -30,15 +30,15 @@ ++ #include ++ #include ++ +++#include "iface.h" ++ #include "types.h" ++ #include "iscsi_proto.h" ++ #include "iscsi_settings.h" ++-#include "initiator.h" ++ #include "iscsi_ipc.h" ++ #include "log.h" ++ #include "transport.h" ++ #include "idbm.h" ++-#include "iface.h" +++#include "initiator.h" ++ #include "sysdeps.h" ++ ++ #define LOG_CONN_CLOSED(conn) \ ++diff --git a/usr/iscsi_sysfs.c b/usr/iscsi_sysfs.c ++index abefde2..73885e8 100644 ++--- a/usr/iscsi_sysfs.c +++++ b/usr/iscsi_sysfs.c ++@@ -26,6 +26,7 @@ ++ #include ++ #include ++ +++#include "iface.h" ++ #include "log.h" ++ #include "initiator.h" ++ #include "transport.h" ++@@ -35,7 +36,6 @@ ++ #include "iscsi_sysfs.h" ++ #include "sysdeps.h" ++ #include "iscsi_settings.h" ++-#include "iface.h" ++ #include "session_info.h" ++ #include "host.h" ++ #include "iscsi_err.h" ++diff --git a/usr/iscsid.c b/usr/iscsid.c ++index 478c83d..2ad9854 100644 ++--- a/usr/iscsid.c +++++ b/usr/iscsid.c ++@@ -39,6 +39,7 @@ ++ #include ++ #endif ++ +++#include "iface.h" ++ #include "iscsid.h" ++ #include "mgmt_ipc.h" ++ #include "event_poll.h" ++@@ -50,7 +51,6 @@ ++ #include "idbm.h" ++ #include "version.h" ++ #include "iscsi_sysfs.h" ++-#include "iface.h" ++ #include "session_info.h" ++ #include "sysdeps.h" ++ #include "discoveryd.h" ++-- ++2.43.0 ++ diff --git a/usr/discovery.c b/usr/discovery.c index 7dec696..71eb4cd 100644 --- a/usr/discovery.c @@ -155,6 +324,23 @@ index 478c83d..2ad9854 100644 #include "session_info.h" #include "sysdeps.h" #include "discoveryd.h" +diff --git a/usr/session_mgmt.c b/usr/session_mgmt.c +index 0500f15..bc4facc 100644 +--- a/usr/session_mgmt.c ++++ b/usr/session_mgmt.c +@@ -24,11 +24,11 @@ + #include + #include + ++#include "session_info.h" + #include "idbm.h" + #include "list.h" + #include "iscsi_util.h" + #include "mgmt_ipc.h" +-#include "session_info.h" + #include "iscsi_sysfs.h" + #include "log.h" + #include "iscsid_req.h" -- 2.43.0 -- Gitee From 3fa022538fb26cfb4f471ff18ba3c67969873541 Mon Sep 17 00:00:00 2001 From: yuncang123 <1050706328@qq.com> Date: Wed, 18 Sep 2024 23:49:22 +0800 Subject: [PATCH 18/28] m --- 0001-32.patch | 260 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 244 insertions(+), 16 deletions(-) diff --git a/0001-32.patch b/0001-32.patch index eee7d5e..517b0a4 100644 --- a/0001-32.patch +++ b/0001-32.patch @@ -1,42 +1,213 @@ -From abad555f3efb2fc660f13a3e228ad20f6ca9f73b Mon Sep 17 00:00:00 2001 +From 48fc583339fe368d0b2e97e074bc320670fb1bc9 Mon Sep 17 00:00:00 2001 From: yuncang123 <1050706328@qq.com> -Date: Wed, 18 Sep 2024 23:43:08 +0800 +Date: Wed, 18 Sep 2024 23:48:35 +0800 Subject: [PATCH] 32 --- - 0001-32.patch | 160 +++++++++++++++++++++++++++++++++++++++++ + 0001-32.patch | 346 +++++++++++++++++++++++++++++++++++++++++ usr/discovery.c | 2 +- + usr/discoveryd.c | 2 +- usr/idbm.c | 2 +- usr/initiator.c | 2 +- usr/initiator_common.c | 2 +- usr/io.c | 4 +- usr/iscsi_sysfs.c | 2 +- usr/iscsid.c | 2 +- + usr/mntcheck.c | 2 +- usr/session_mgmt.c | 2 +- - 9 files changed, 169 insertions(+), 9 deletions(-) + 11 files changed, 357 insertions(+), 11 deletions(-) create mode 100644 0001-32.patch diff --git a/0001-32.patch b/0001-32.patch new file mode 100644 -index 0000000..8aa656d +index 0000000..eee7d5e --- /dev/null +++ b/0001-32.patch -@@ -0,0 +1,160 @@ -+From 7c5541d340bc9bc338f44eb4ac7c53ae4fb03073 Mon Sep 17 00:00:00 2001 +@@ -0,0 +1,346 @@ ++From abad555f3efb2fc660f13a3e228ad20f6ca9f73b Mon Sep 17 00:00:00 2001 +From: yuncang123 <1050706328@qq.com> -+Date: Wed, 18 Sep 2024 21:37:02 +0800 ++Date: Wed, 18 Sep 2024 23:43:08 +0800 +Subject: [PATCH] 32 + +--- -+ usr/discovery.c | 2 +- -+ usr/idbm.c | 2 +- -+ usr/initiator.c | 2 +- -+ usr/initiator_common.c | 2 +- -+ usr/io.c | 4 ++-- -+ usr/iscsi_sysfs.c | 2 +- -+ usr/iscsid.c | 2 +- -+ 7 files changed, 8 insertions(+), 8 deletions(-) ++ 0001-32.patch | 160 +++++++++++++++++++++++++++++++++++++++++ ++ usr/discovery.c | 2 +- ++ usr/idbm.c | 2 +- ++ usr/initiator.c | 2 +- ++ usr/initiator_common.c | 2 +- ++ usr/io.c | 4 +- ++ usr/iscsi_sysfs.c | 2 +- ++ usr/iscsid.c | 2 +- ++ usr/session_mgmt.c | 2 +- ++ 9 files changed, 169 insertions(+), 9 deletions(-) ++ create mode 100644 0001-32.patch + ++diff --git a/0001-32.patch b/0001-32.patch ++new file mode 100644 ++index 0000000..8aa656d ++--- /dev/null +++++ b/0001-32.patch ++@@ -0,0 +1,160 @@ +++From 7c5541d340bc9bc338f44eb4ac7c53ae4fb03073 Mon Sep 17 00:00:00 2001 +++From: yuncang123 <1050706328@qq.com> +++Date: Wed, 18 Sep 2024 21:37:02 +0800 +++Subject: [PATCH] 32 +++ +++--- +++ usr/discovery.c | 2 +- +++ usr/idbm.c | 2 +- +++ usr/initiator.c | 2 +- +++ usr/initiator_common.c | 2 +- +++ usr/io.c | 4 ++-- +++ usr/iscsi_sysfs.c | 2 +- +++ usr/iscsid.c | 2 +- +++ 7 files changed, 8 insertions(+), 8 deletions(-) +++ +++diff --git a/usr/discovery.c b/usr/discovery.c +++index 7dec696..71eb4cd 100644 +++--- a/usr/discovery.c ++++++ b/usr/discovery.c +++@@ -32,6 +32,7 @@ +++ #include +++ #include +++ ++++#include "iface.h" +++ #include "local_strings.h" +++ #include "types.h" +++ #include "iscsi_proto.h" +++@@ -46,7 +47,6 @@ +++ #include "transport.h" +++ #include "iscsi_sysfs.h" +++ #include "iscsi_ipc.h" +++-#include "iface.h" +++ #include "iscsi_timer.h" +++ #include "iscsi_err.h" +++ /* libisns includes */ +++diff --git a/usr/idbm.c b/usr/idbm.c +++index e1a9021..5467675 100644 +++--- a/usr/idbm.c ++++++ b/usr/idbm.c +++@@ -32,6 +32,7 @@ +++ #include +++ #include +++ ++++#include "iface.h" +++ #include "idbm.h" +++ #include "idbm_fields.h" +++ #include "log.h" +++@@ -39,7 +40,6 @@ +++ #include "iscsi_settings.h" +++ #include "transport.h" +++ #include "iscsi_sysfs.h" +++-#include "iface.h" +++ #include "sysdeps.h" +++ #include "fw_context.h" +++ #include "iscsi_err.h" +++diff --git a/usr/initiator.c b/usr/initiator.c +++index 684647c..5b340fc 100644 +++--- a/usr/initiator.c ++++++ b/usr/initiator.c +++@@ -31,6 +31,7 @@ +++ #include +++ #include +++ ++++#include "iface.h" +++ #include "initiator.h" +++ #include "transport.h" +++ #include "iscsid.h" +++@@ -44,7 +45,6 @@ +++ #include "scsi.h" +++ #include "iscsi_sysfs.h" +++ #include "iscsi_settings.h" +++-#include "iface.h" +++ #include "host.h" +++ #include "sysdeps.h" +++ #include "iscsi_err.h" +++diff --git a/usr/initiator_common.c b/usr/initiator_common.c +++index 6cf26c1..4387175 100644 +++--- a/usr/initiator_common.c ++++++ b/usr/initiator_common.c +++@@ -26,6 +26,7 @@ +++ #include +++ #include +++ ++++#include "iface.h" +++ #include "initiator.h" +++ #include "transport.h" +++ #include "iscsid.h" +++@@ -33,7 +34,6 @@ +++ #include "log.h" +++ #include "iscsi_sysfs.h" +++ #include "iscsi_settings.h" +++-#include "iface.h" +++ #include "host.h" +++ #include "sysdeps.h" +++ #include "iscsi_err.h" +++diff --git a/usr/io.c b/usr/io.c +++index a46c9f8..2961057 100644 +++--- a/usr/io.c ++++++ b/usr/io.c +++@@ -30,15 +30,15 @@ +++ #include +++ #include +++ ++++#include "iface.h" +++ #include "types.h" +++ #include "iscsi_proto.h" +++ #include "iscsi_settings.h" +++-#include "initiator.h" +++ #include "iscsi_ipc.h" +++ #include "log.h" +++ #include "transport.h" +++ #include "idbm.h" +++-#include "iface.h" ++++#include "initiator.h" +++ #include "sysdeps.h" +++ +++ #define LOG_CONN_CLOSED(conn) \ +++diff --git a/usr/iscsi_sysfs.c b/usr/iscsi_sysfs.c +++index abefde2..73885e8 100644 +++--- a/usr/iscsi_sysfs.c ++++++ b/usr/iscsi_sysfs.c +++@@ -26,6 +26,7 @@ +++ #include +++ #include +++ ++++#include "iface.h" +++ #include "log.h" +++ #include "initiator.h" +++ #include "transport.h" +++@@ -35,7 +36,6 @@ +++ #include "iscsi_sysfs.h" +++ #include "sysdeps.h" +++ #include "iscsi_settings.h" +++-#include "iface.h" +++ #include "session_info.h" +++ #include "host.h" +++ #include "iscsi_err.h" +++diff --git a/usr/iscsid.c b/usr/iscsid.c +++index 478c83d..2ad9854 100644 +++--- a/usr/iscsid.c ++++++ b/usr/iscsid.c +++@@ -39,6 +39,7 @@ +++ #include +++ #endif +++ ++++#include "iface.h" +++ #include "iscsid.h" +++ #include "mgmt_ipc.h" +++ #include "event_poll.h" +++@@ -50,7 +51,6 @@ +++ #include "idbm.h" +++ #include "version.h" +++ #include "iscsi_sysfs.h" +++-#include "iface.h" +++ #include "session_info.h" +++ #include "sysdeps.h" +++ #include "discoveryd.h" +++-- +++2.43.0 +++ +diff --git a/usr/discovery.c b/usr/discovery.c +index 7dec696..71eb4cd 100644 +--- a/usr/discovery.c @@ -179,6 +350,23 @@ index 0000000..8aa656d + #include "session_info.h" + #include "sysdeps.h" + #include "discoveryd.h" ++diff --git a/usr/session_mgmt.c b/usr/session_mgmt.c ++index 0500f15..bc4facc 100644 ++--- a/usr/session_mgmt.c +++++ b/usr/session_mgmt.c ++@@ -24,11 +24,11 @@ ++ #include ++ #include ++ +++#include "session_info.h" ++ #include "idbm.h" ++ #include "list.h" ++ #include "iscsi_util.h" ++ #include "mgmt_ipc.h" ++-#include "session_info.h" ++ #include "iscsi_sysfs.h" ++ #include "log.h" ++ #include "iscsid_req.h" +-- +2.43.0 + @@ -202,6 +390,26 @@ index 7dec696..71eb4cd 100644 #include "iscsi_timer.h" #include "iscsi_err.h" /* libisns includes */ +diff --git a/usr/discoveryd.c b/usr/discoveryd.c +index 08eb2bb..6895b43 100644 +--- a/usr/discoveryd.c ++++ b/usr/discoveryd.c +@@ -28,6 +28,7 @@ + #include + #include + ++#include "iface.h" + #include "discovery.h" + #include "idbm.h" + #include "list.h" +@@ -37,7 +38,6 @@ + #include "session_mgmt.h" + #include "iscsi_util.h" + #include "event_poll.h" +-#include "iface.h" + #include "session_mgmt.h" + #include "session_info.h" + #include "iscsi_err.h" diff --git a/usr/idbm.c b/usr/idbm.c index e1a9021..5467675 100644 --- a/usr/idbm.c @@ -324,6 +532,26 @@ index 478c83d..2ad9854 100644 #include "session_info.h" #include "sysdeps.h" #include "discoveryd.h" +diff --git a/usr/mntcheck.c b/usr/mntcheck.c +index 6ae03e0..d1dd110 100644 +--- a/usr/mntcheck.c ++++ b/usr/mntcheck.c +@@ -24,6 +24,7 @@ + #include + #include + ++#include "iface.h" + #include "initiator.h" + #include "transport.h" + #include "iscsid.h" +@@ -31,7 +32,6 @@ + #include "log.h" + #include "iscsi_sysfs.h" + #include "iscsi_settings.h" +-#include "iface.h" + #include "host.h" + #include "sysdeps.h" + #include "iscsi_err.h" diff --git a/usr/session_mgmt.c b/usr/session_mgmt.c index 0500f15..bc4facc 100644 --- a/usr/session_mgmt.c -- Gitee From 274a7f41e65d6ec99220e1ed570c42f3301a25c7 Mon Sep 17 00:00:00 2001 From: yuncang123 <1050706328@qq.com> Date: Thu, 19 Sep 2024 00:13:10 +0800 Subject: [PATCH 19/28] m --- 0001-33.patch | 25 +++++++++++++++++++++++++ open-iscsi.spec | 1 + 2 files changed, 26 insertions(+) create mode 100644 0001-33.patch diff --git a/0001-33.patch b/0001-33.patch new file mode 100644 index 0000000..0c4f894 --- /dev/null +++ b/0001-33.patch @@ -0,0 +1,25 @@ +From 17471e393bf59af0fbb5afa2f478d02b7d36150e Mon Sep 17 00:00:00 2001 +From: yuncang123 <1050706328@qq.com> +Date: Thu, 19 Sep 2024 00:12:12 +0800 +Subject: [PATCH] 33 + +--- + usr/iface.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/usr/iface.h b/usr/iface.h +index 095772e..a443e4f 100644 +--- a/usr/iface.h ++++ b/usr/iface.h +@@ -21,7 +21,7 @@ + #define ISCSI_IFACE_H + + #include +- ++#include + #define IFACE_CONFIG_DIR ISCSI_CONFIG_ROOT"ifaces" + + struct iface_rec; +-- +2.43.0 + diff --git a/open-iscsi.spec b/open-iscsi.spec index 36d26df..6db3b43 100644 --- a/open-iscsi.spec +++ b/open-iscsi.spec @@ -41,6 +41,7 @@ patch29: 0029-backport-fix-missing-underline-in-iscsid_req.h.patch patch30: 0001-gnu-variable-sized-type-not-at-end.patch patch31: 0001-32.patch patch32: 0030-fix-implicit-truncation-from-int-to-one-bit.patch +patch33: 0001-33.patch BuildRequires: flex bison doxygen kmod-devel systemd-units gcc git isns-utils-devel systemd-devel BuildRequires: autoconf automake libtool libmount-devel openssl-devel pkg-config -- Gitee From 0ffd4c1e4762904d4c03a2a311f35367908a813a Mon Sep 17 00:00:00 2001 From: yuncang123 <1050706328@qq.com> Date: Thu, 19 Sep 2024 00:23:32 +0800 Subject: [PATCH 20/28] m --- 0001-32.patch | 426 +++++++------------------------------------------- 1 file changed, 59 insertions(+), 367 deletions(-) diff --git a/0001-32.patch b/0001-32.patch index 517b0a4..a22063f 100644 --- a/0001-32.patch +++ b/0001-32.patch @@ -1,375 +1,23 @@ -From 48fc583339fe368d0b2e97e074bc320670fb1bc9 Mon Sep 17 00:00:00 2001 +From 0fa34dce3c9436a8769d28aa44037db7894d47c2 Mon Sep 17 00:00:00 2001 From: yuncang123 <1050706328@qq.com> -Date: Wed, 18 Sep 2024 23:48:35 +0800 +Date: Thu, 19 Sep 2024 00:23:05 +0800 Subject: [PATCH] 32 --- - 0001-32.patch | 346 +++++++++++++++++++++++++++++++++++++++++ - usr/discovery.c | 2 +- - usr/discoveryd.c | 2 +- - usr/idbm.c | 2 +- - usr/initiator.c | 2 +- - usr/initiator_common.c | 2 +- - usr/io.c | 4 +- - usr/iscsi_sysfs.c | 2 +- - usr/iscsid.c | 2 +- - usr/mntcheck.c | 2 +- - usr/session_mgmt.c | 2 +- - 11 files changed, 357 insertions(+), 11 deletions(-) - create mode 100644 0001-32.patch + usr/discovery.c | 2 +- + usr/discoveryd.c | 2 +- + usr/host.c | 2 +- + usr/idbm.c | 2 +- + usr/initiator.c | 2 +- + usr/initiator_common.c | 2 +- + usr/io.c | 4 ++-- + usr/iscsi_sysfs.c | 2 +- + usr/iscsid.c | 2 +- + usr/iscsistart.c | 3 +-- + usr/mntcheck.c | 2 +- + usr/session_mgmt.c | 2 +- + 12 files changed, 13 insertions(+), 14 deletions(-) -diff --git a/0001-32.patch b/0001-32.patch -new file mode 100644 -index 0000000..eee7d5e ---- /dev/null -+++ b/0001-32.patch -@@ -0,0 +1,346 @@ -+From abad555f3efb2fc660f13a3e228ad20f6ca9f73b Mon Sep 17 00:00:00 2001 -+From: yuncang123 <1050706328@qq.com> -+Date: Wed, 18 Sep 2024 23:43:08 +0800 -+Subject: [PATCH] 32 -+ -+--- -+ 0001-32.patch | 160 +++++++++++++++++++++++++++++++++++++++++ -+ usr/discovery.c | 2 +- -+ usr/idbm.c | 2 +- -+ usr/initiator.c | 2 +- -+ usr/initiator_common.c | 2 +- -+ usr/io.c | 4 +- -+ usr/iscsi_sysfs.c | 2 +- -+ usr/iscsid.c | 2 +- -+ usr/session_mgmt.c | 2 +- -+ 9 files changed, 169 insertions(+), 9 deletions(-) -+ create mode 100644 0001-32.patch -+ -+diff --git a/0001-32.patch b/0001-32.patch -+new file mode 100644 -+index 0000000..8aa656d -+--- /dev/null -++++ b/0001-32.patch -+@@ -0,0 +1,160 @@ -++From 7c5541d340bc9bc338f44eb4ac7c53ae4fb03073 Mon Sep 17 00:00:00 2001 -++From: yuncang123 <1050706328@qq.com> -++Date: Wed, 18 Sep 2024 21:37:02 +0800 -++Subject: [PATCH] 32 -++ -++--- -++ usr/discovery.c | 2 +- -++ usr/idbm.c | 2 +- -++ usr/initiator.c | 2 +- -++ usr/initiator_common.c | 2 +- -++ usr/io.c | 4 ++-- -++ usr/iscsi_sysfs.c | 2 +- -++ usr/iscsid.c | 2 +- -++ 7 files changed, 8 insertions(+), 8 deletions(-) -++ -++diff --git a/usr/discovery.c b/usr/discovery.c -++index 7dec696..71eb4cd 100644 -++--- a/usr/discovery.c -+++++ b/usr/discovery.c -++@@ -32,6 +32,7 @@ -++ #include -++ #include -++ -+++#include "iface.h" -++ #include "local_strings.h" -++ #include "types.h" -++ #include "iscsi_proto.h" -++@@ -46,7 +47,6 @@ -++ #include "transport.h" -++ #include "iscsi_sysfs.h" -++ #include "iscsi_ipc.h" -++-#include "iface.h" -++ #include "iscsi_timer.h" -++ #include "iscsi_err.h" -++ /* libisns includes */ -++diff --git a/usr/idbm.c b/usr/idbm.c -++index e1a9021..5467675 100644 -++--- a/usr/idbm.c -+++++ b/usr/idbm.c -++@@ -32,6 +32,7 @@ -++ #include -++ #include -++ -+++#include "iface.h" -++ #include "idbm.h" -++ #include "idbm_fields.h" -++ #include "log.h" -++@@ -39,7 +40,6 @@ -++ #include "iscsi_settings.h" -++ #include "transport.h" -++ #include "iscsi_sysfs.h" -++-#include "iface.h" -++ #include "sysdeps.h" -++ #include "fw_context.h" -++ #include "iscsi_err.h" -++diff --git a/usr/initiator.c b/usr/initiator.c -++index 684647c..5b340fc 100644 -++--- a/usr/initiator.c -+++++ b/usr/initiator.c -++@@ -31,6 +31,7 @@ -++ #include -++ #include -++ -+++#include "iface.h" -++ #include "initiator.h" -++ #include "transport.h" -++ #include "iscsid.h" -++@@ -44,7 +45,6 @@ -++ #include "scsi.h" -++ #include "iscsi_sysfs.h" -++ #include "iscsi_settings.h" -++-#include "iface.h" -++ #include "host.h" -++ #include "sysdeps.h" -++ #include "iscsi_err.h" -++diff --git a/usr/initiator_common.c b/usr/initiator_common.c -++index 6cf26c1..4387175 100644 -++--- a/usr/initiator_common.c -+++++ b/usr/initiator_common.c -++@@ -26,6 +26,7 @@ -++ #include -++ #include -++ -+++#include "iface.h" -++ #include "initiator.h" -++ #include "transport.h" -++ #include "iscsid.h" -++@@ -33,7 +34,6 @@ -++ #include "log.h" -++ #include "iscsi_sysfs.h" -++ #include "iscsi_settings.h" -++-#include "iface.h" -++ #include "host.h" -++ #include "sysdeps.h" -++ #include "iscsi_err.h" -++diff --git a/usr/io.c b/usr/io.c -++index a46c9f8..2961057 100644 -++--- a/usr/io.c -+++++ b/usr/io.c -++@@ -30,15 +30,15 @@ -++ #include -++ #include -++ -+++#include "iface.h" -++ #include "types.h" -++ #include "iscsi_proto.h" -++ #include "iscsi_settings.h" -++-#include "initiator.h" -++ #include "iscsi_ipc.h" -++ #include "log.h" -++ #include "transport.h" -++ #include "idbm.h" -++-#include "iface.h" -+++#include "initiator.h" -++ #include "sysdeps.h" -++ -++ #define LOG_CONN_CLOSED(conn) \ -++diff --git a/usr/iscsi_sysfs.c b/usr/iscsi_sysfs.c -++index abefde2..73885e8 100644 -++--- a/usr/iscsi_sysfs.c -+++++ b/usr/iscsi_sysfs.c -++@@ -26,6 +26,7 @@ -++ #include -++ #include -++ -+++#include "iface.h" -++ #include "log.h" -++ #include "initiator.h" -++ #include "transport.h" -++@@ -35,7 +36,6 @@ -++ #include "iscsi_sysfs.h" -++ #include "sysdeps.h" -++ #include "iscsi_settings.h" -++-#include "iface.h" -++ #include "session_info.h" -++ #include "host.h" -++ #include "iscsi_err.h" -++diff --git a/usr/iscsid.c b/usr/iscsid.c -++index 478c83d..2ad9854 100644 -++--- a/usr/iscsid.c -+++++ b/usr/iscsid.c -++@@ -39,6 +39,7 @@ -++ #include -++ #endif -++ -+++#include "iface.h" -++ #include "iscsid.h" -++ #include "mgmt_ipc.h" -++ #include "event_poll.h" -++@@ -50,7 +51,6 @@ -++ #include "idbm.h" -++ #include "version.h" -++ #include "iscsi_sysfs.h" -++-#include "iface.h" -++ #include "session_info.h" -++ #include "sysdeps.h" -++ #include "discoveryd.h" -++-- -++2.43.0 -++ -+diff --git a/usr/discovery.c b/usr/discovery.c -+index 7dec696..71eb4cd 100644 -+--- a/usr/discovery.c -++++ b/usr/discovery.c -+@@ -32,6 +32,7 @@ -+ #include -+ #include -+ -++#include "iface.h" -+ #include "local_strings.h" -+ #include "types.h" -+ #include "iscsi_proto.h" -+@@ -46,7 +47,6 @@ -+ #include "transport.h" -+ #include "iscsi_sysfs.h" -+ #include "iscsi_ipc.h" -+-#include "iface.h" -+ #include "iscsi_timer.h" -+ #include "iscsi_err.h" -+ /* libisns includes */ -+diff --git a/usr/idbm.c b/usr/idbm.c -+index e1a9021..5467675 100644 -+--- a/usr/idbm.c -++++ b/usr/idbm.c -+@@ -32,6 +32,7 @@ -+ #include -+ #include -+ -++#include "iface.h" -+ #include "idbm.h" -+ #include "idbm_fields.h" -+ #include "log.h" -+@@ -39,7 +40,6 @@ -+ #include "iscsi_settings.h" -+ #include "transport.h" -+ #include "iscsi_sysfs.h" -+-#include "iface.h" -+ #include "sysdeps.h" -+ #include "fw_context.h" -+ #include "iscsi_err.h" -+diff --git a/usr/initiator.c b/usr/initiator.c -+index 684647c..5b340fc 100644 -+--- a/usr/initiator.c -++++ b/usr/initiator.c -+@@ -31,6 +31,7 @@ -+ #include -+ #include -+ -++#include "iface.h" -+ #include "initiator.h" -+ #include "transport.h" -+ #include "iscsid.h" -+@@ -44,7 +45,6 @@ -+ #include "scsi.h" -+ #include "iscsi_sysfs.h" -+ #include "iscsi_settings.h" -+-#include "iface.h" -+ #include "host.h" -+ #include "sysdeps.h" -+ #include "iscsi_err.h" -+diff --git a/usr/initiator_common.c b/usr/initiator_common.c -+index 6cf26c1..4387175 100644 -+--- a/usr/initiator_common.c -++++ b/usr/initiator_common.c -+@@ -26,6 +26,7 @@ -+ #include -+ #include -+ -++#include "iface.h" -+ #include "initiator.h" -+ #include "transport.h" -+ #include "iscsid.h" -+@@ -33,7 +34,6 @@ -+ #include "log.h" -+ #include "iscsi_sysfs.h" -+ #include "iscsi_settings.h" -+-#include "iface.h" -+ #include "host.h" -+ #include "sysdeps.h" -+ #include "iscsi_err.h" -+diff --git a/usr/io.c b/usr/io.c -+index a46c9f8..2961057 100644 -+--- a/usr/io.c -++++ b/usr/io.c -+@@ -30,15 +30,15 @@ -+ #include -+ #include -+ -++#include "iface.h" -+ #include "types.h" -+ #include "iscsi_proto.h" -+ #include "iscsi_settings.h" -+-#include "initiator.h" -+ #include "iscsi_ipc.h" -+ #include "log.h" -+ #include "transport.h" -+ #include "idbm.h" -+-#include "iface.h" -++#include "initiator.h" -+ #include "sysdeps.h" -+ -+ #define LOG_CONN_CLOSED(conn) \ -+diff --git a/usr/iscsi_sysfs.c b/usr/iscsi_sysfs.c -+index abefde2..73885e8 100644 -+--- a/usr/iscsi_sysfs.c -++++ b/usr/iscsi_sysfs.c -+@@ -26,6 +26,7 @@ -+ #include -+ #include -+ -++#include "iface.h" -+ #include "log.h" -+ #include "initiator.h" -+ #include "transport.h" -+@@ -35,7 +36,6 @@ -+ #include "iscsi_sysfs.h" -+ #include "sysdeps.h" -+ #include "iscsi_settings.h" -+-#include "iface.h" -+ #include "session_info.h" -+ #include "host.h" -+ #include "iscsi_err.h" -+diff --git a/usr/iscsid.c b/usr/iscsid.c -+index 478c83d..2ad9854 100644 -+--- a/usr/iscsid.c -++++ b/usr/iscsid.c -+@@ -39,6 +39,7 @@ -+ #include -+ #endif -+ -++#include "iface.h" -+ #include "iscsid.h" -+ #include "mgmt_ipc.h" -+ #include "event_poll.h" -+@@ -50,7 +51,6 @@ -+ #include "idbm.h" -+ #include "version.h" -+ #include "iscsi_sysfs.h" -+-#include "iface.h" -+ #include "session_info.h" -+ #include "sysdeps.h" -+ #include "discoveryd.h" -+diff --git a/usr/session_mgmt.c b/usr/session_mgmt.c -+index 0500f15..bc4facc 100644 -+--- a/usr/session_mgmt.c -++++ b/usr/session_mgmt.c -+@@ -24,11 +24,11 @@ -+ #include -+ #include -+ -++#include "session_info.h" -+ #include "idbm.h" -+ #include "list.h" -+ #include "iscsi_util.h" -+ #include "mgmt_ipc.h" -+-#include "session_info.h" -+ #include "iscsi_sysfs.h" -+ #include "log.h" -+ #include "iscsid_req.h" -+-- -+2.43.0 -+ diff --git a/usr/discovery.c b/usr/discovery.c index 7dec696..71eb4cd 100644 --- a/usr/discovery.c @@ -410,6 +58,26 @@ index 08eb2bb..6895b43 100644 #include "session_mgmt.h" #include "session_info.h" #include "iscsi_err.h" +diff --git a/usr/host.c b/usr/host.c +index a12577c..a54b09f 100644 +--- a/usr/host.c ++++ b/usr/host.c +@@ -21,6 +21,7 @@ + #include + #include + ++#include "iface.h" + #include "list.h" + #include "iscsi_util.h" + #include "log.h" +@@ -32,7 +33,6 @@ + #include "session_info.h" + #include "transport.h" + #include "initiator.h" +-#include "iface.h" + #include "iscsi_err.h" + #include "iscsi_netlink.h" + diff --git a/usr/idbm.c b/usr/idbm.c index e1a9021..5467675 100644 --- a/usr/idbm.c @@ -532,6 +200,30 @@ index 478c83d..2ad9854 100644 #include "session_info.h" #include "sysdeps.h" #include "discoveryd.h" +diff --git a/usr/iscsistart.c b/usr/iscsistart.c +index 7eb573e..7543d35 100644 +--- a/usr/iscsistart.c ++++ b/usr/iscsistart.c +@@ -33,6 +33,7 @@ + #include + #include + ++#include "iface.h" + #include "initiator.h" + #include "iscsi_ipc.h" + #include "event_poll.h" +@@ -45,11 +46,9 @@ + #include "iscsi_sysfs.h" + #include "iscsi_settings.h" + #include "fw_context.h" +-#include "iface.h" + #include "sysdeps.h" + #include "iscsid_req.h" + #include "iscsi_err.h" +-#include "iface.h" + + /* global config info */ + /* initiator needs initiator name/alias */ diff --git a/usr/mntcheck.c b/usr/mntcheck.c index 6ae03e0..d1dd110 100644 --- a/usr/mntcheck.c -- Gitee From c8530dfc4b977fefaf9ea13c5596111a542d7194 Mon Sep 17 00:00:00 2001 From: yuncang123 <1050706328@qq.com> Date: Thu, 19 Sep 2024 00:34:41 +0800 Subject: [PATCH 21/28] m --- 0001-33.patch | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/0001-33.patch b/0001-33.patch index 0c4f894..338dfd8 100644 --- a/0001-33.patch +++ b/0001-33.patch @@ -1,25 +1,24 @@ -From 17471e393bf59af0fbb5afa2f478d02b7d36150e Mon Sep 17 00:00:00 2001 +From 67c9f616c1e626464e3c2628039db257e9ef562f Mon Sep 17 00:00:00 2001 From: yuncang123 <1050706328@qq.com> -Date: Thu, 19 Sep 2024 00:12:12 +0800 +Date: Thu, 19 Sep 2024 00:34:08 +0800 Subject: [PATCH] 33 --- - usr/iface.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + usr/iface.h | 1 + + 1 file changed, 1 insertion(+) diff --git a/usr/iface.h b/usr/iface.h -index 095772e..a443e4f 100644 +index 095772e..fe099c7 100644 --- a/usr/iface.h +++ b/usr/iface.h -@@ -21,7 +21,7 @@ +@@ -21,6 +21,7 @@ #define ISCSI_IFACE_H #include -- +#include + #define IFACE_CONFIG_DIR ISCSI_CONFIG_ROOT"ifaces" - struct iface_rec; -- 2.43.0 -- Gitee From 9ad58f297d2b3652a50081b63bb9b8d7aa7d69b5 Mon Sep 17 00:00:00 2001 From: yuncang123 <1050706328@qq.com> Date: Thu, 19 Sep 2024 01:54:56 +0800 Subject: [PATCH 22/28] m --- 0001-32.patch | 16 ++++++------ ...licit-truncation-from-int-to-one-bit.patch | 25 +++++++++++++++++++ open-iscsi.spec | 2 +- 3 files changed, 33 insertions(+), 10 deletions(-) create mode 100644 0031-fix-implicit-truncation-from-int-to-one-bit.patch diff --git a/0001-32.patch b/0001-32.patch index a22063f..75b71fa 100644 --- a/0001-32.patch +++ b/0001-32.patch @@ -1,6 +1,6 @@ -From 0fa34dce3c9436a8769d28aa44037db7894d47c2 Mon Sep 17 00:00:00 2001 +From 093475a8c09ef02ff704f3a8737ce67ee0f8eb9f Mon Sep 17 00:00:00 2001 From: yuncang123 <1050706328@qq.com> -Date: Thu, 19 Sep 2024 00:23:05 +0800 +Date: Thu, 19 Sep 2024 01:54:05 +0800 Subject: [PATCH] 32 --- @@ -10,13 +10,13 @@ Subject: [PATCH] 32 usr/idbm.c | 2 +- usr/initiator.c | 2 +- usr/initiator_common.c | 2 +- - usr/io.c | 4 ++-- + usr/io.c | 2 +- usr/iscsi_sysfs.c | 2 +- usr/iscsid.c | 2 +- usr/iscsistart.c | 3 +-- usr/mntcheck.c | 2 +- usr/session_mgmt.c | 2 +- - 12 files changed, 13 insertions(+), 14 deletions(-) + 12 files changed, 12 insertions(+), 13 deletions(-) diff --git a/usr/discovery.c b/usr/discovery.c index 7dec696..71eb4cd 100644 @@ -139,10 +139,10 @@ index 6cf26c1..4387175 100644 #include "sysdeps.h" #include "iscsi_err.h" diff --git a/usr/io.c b/usr/io.c -index a46c9f8..2961057 100644 +index a46c9f8..e716264 100644 --- a/usr/io.c +++ b/usr/io.c -@@ -30,15 +30,15 @@ +@@ -30,6 +30,7 @@ #include #include @@ -150,13 +150,11 @@ index a46c9f8..2961057 100644 #include "types.h" #include "iscsi_proto.h" #include "iscsi_settings.h" --#include "initiator.h" - #include "iscsi_ipc.h" +@@ -38,7 +39,6 @@ #include "log.h" #include "transport.h" #include "idbm.h" -#include "iface.h" -+#include "initiator.h" #include "sysdeps.h" #define LOG_CONN_CLOSED(conn) \ diff --git a/0031-fix-implicit-truncation-from-int-to-one-bit.patch b/0031-fix-implicit-truncation-from-int-to-one-bit.patch new file mode 100644 index 0000000..c5b7bcb --- /dev/null +++ b/0031-fix-implicit-truncation-from-int-to-one-bit.patch @@ -0,0 +1,25 @@ +From 710118f1303722671103cbdd3bf9ef5072eff695 Mon Sep 17 00:00:00 2001 +From: yuncang123 <1050706328@qq.com> +Date: Thu, 19 Sep 2024 01:03:22 +0800 +Subject: [PATCH] 34 + +--- + usr/initiator.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/usr/initiator.h b/usr/initiator.h +index dbf6f2b..a1757eb 100644 +--- a/usr/initiator.h ++++ b/usr/initiator.h +@@ -185,7 +185,7 @@ typedef struct queue_task { + iscsiadm_req_t req; + iscsiadm_rsp_t rsp; + int mgmt_ipc_fd; +- int allocated : 1; ++ unsigned int allocated : 1; + /* Newer request types include a + * variable-length payload */ + void *payload; +-- +2.43.0 + diff --git a/open-iscsi.spec b/open-iscsi.spec index 6db3b43..e1bc7d7 100644 --- a/open-iscsi.spec +++ b/open-iscsi.spec @@ -40,7 +40,7 @@ patch28: 0028-discoveryd-fix-format-overflow-warning-413.patch patch29: 0029-backport-fix-missing-underline-in-iscsid_req.h.patch patch30: 0001-gnu-variable-sized-type-not-at-end.patch patch31: 0001-32.patch -patch32: 0030-fix-implicit-truncation-from-int-to-one-bit.patch +patch32: 0031-fix-implicit-truncation-from-int-to-one-bit.patch patch33: 0001-33.patch BuildRequires: flex bison doxygen kmod-devel systemd-units gcc git isns-utils-devel systemd-devel -- Gitee From 79e52e93564abf67df5b2d4ec2d6ae4f470c97a3 Mon Sep 17 00:00:00 2001 From: yuncang123 <1050706328@qq.com> Date: Thu, 19 Sep 2024 02:25:41 +0800 Subject: [PATCH 23/28] m --- open-iscsi.spec | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/open-iscsi.spec b/open-iscsi.spec index e1bc7d7..8d3e381 100644 --- a/open-iscsi.spec +++ b/open-iscsi.spec @@ -38,10 +38,9 @@ patch26: 0026-iscsid-clear-scanning-thread-s-PR_SET_IO_FLUSHER-fla.patch patch27: 0027-iscsid-stop-connection-for-recovery-if-error-is-not-.patch patch28: 0028-discoveryd-fix-format-overflow-warning-413.patch patch29: 0029-backport-fix-missing-underline-in-iscsid_req.h.patch -patch30: 0001-gnu-variable-sized-type-not-at-end.patch -patch31: 0001-32.patch -patch32: 0031-fix-implicit-truncation-from-int-to-one-bit.patch -patch33: 0001-33.patch +patch30: 0001-32.patch +patch31: 0031-fix-implicit-truncation-from-int-to-one-bit.patch +patch32: 0001-33.patch BuildRequires: flex bison doxygen kmod-devel systemd-units gcc git isns-utils-devel systemd-devel BuildRequires: autoconf automake libtool libmount-devel openssl-devel pkg-config @@ -97,7 +96,7 @@ perl -i -pe 's|^exec_prefix = /$|exec_prefix = %{_exec_prefix}|' Makefile %build %if "%toolchain"=="clang" -CFLAGS="%{optflags} -DUSE_KMOD -Wno-error=unused-command-line-argument -Wno-error=unused-but-set-variable" \ +CFLAGS="%{optflags} -DUSE_KMOD -Wno-error=unused-command-line-argument -Wno-error=unused-but-set-variable -Wno-error=gnu-variable-sized-type-not-at-end" \ LDFLAGS="%{?__global_ldflags} -lkmod" \ LIB_DIR=%{_libdir} %make_build -- Gitee From 3cd5faf0a9efa4bad45f94408c0fc5bf2c5be419 Mon Sep 17 00:00:00 2001 From: yuncang123 <1050706328@qq.com> Date: Thu, 19 Sep 2024 18:12:50 +0800 Subject: [PATCH 24/28] m --- 0001-rm-unused.patch | 40 ++++++++++++++++++++++++++++++++++++++++ open-iscsi.spec | 1 + 2 files changed, 41 insertions(+) create mode 100644 0001-rm-unused.patch diff --git a/0001-rm-unused.patch b/0001-rm-unused.patch new file mode 100644 index 0000000..f624bab --- /dev/null +++ b/0001-rm-unused.patch @@ -0,0 +1,40 @@ +From ffba593aab7f7ff07761c2041de666ba1126a211 Mon Sep 17 00:00:00 2001 +From: yuncang123 <1050706328@qq.com> +Date: Thu, 19 Sep 2024 18:10:40 +0800 +Subject: [PATCH] rm unused + +--- + usr/discovery.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/usr/discovery.c b/usr/discovery.c +index 7dec696..8ec208b 100644 +--- a/usr/discovery.c ++++ b/usr/discovery.c +@@ -695,7 +695,6 @@ process_sendtargets_response(struct str_buffer *sendtargets, + char *end = text + str_data_length(sendtargets); + char *nul = end - 1; + char *record = NULL; +- int num_targets = 0; + + if (start == end) { + /* no SendTargets data */ +@@ -745,7 +744,6 @@ process_sendtargets_response(struct str_buffer *sendtargets, + str_truncate_buffer(sendtargets, 0); + goto done; + } +- num_targets++; + } + record = text; + } +@@ -768,7 +766,6 @@ process_sendtargets_response(struct str_buffer *sendtargets, + record, record); + if (add_target_record (record + 11, text, + drec, rec_list)) { +- num_targets++; + record = NULL; + str_truncate_buffer(sendtargets, 0); + } else { +-- +2.43.0 + diff --git a/open-iscsi.spec b/open-iscsi.spec index 8d3e381..b0a7b2c 100644 --- a/open-iscsi.spec +++ b/open-iscsi.spec @@ -41,6 +41,7 @@ patch29: 0029-backport-fix-missing-underline-in-iscsid_req.h.patch patch30: 0001-32.patch patch31: 0031-fix-implicit-truncation-from-int-to-one-bit.patch patch32: 0001-33.patch +patch33: 0001-rm-unused.patch BuildRequires: flex bison doxygen kmod-devel systemd-units gcc git isns-utils-devel systemd-devel BuildRequires: autoconf automake libtool libmount-devel openssl-devel pkg-config -- Gitee From 2ec9eb92a9009fa9f632d400b934e7b75df06d1d Mon Sep 17 00:00:00 2001 From: yuncang123 <1050706328@qq.com> Date: Thu, 19 Sep 2024 18:13:27 +0800 Subject: [PATCH 25/28] m --- open-iscsi.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/open-iscsi.spec b/open-iscsi.spec index b0a7b2c..3a0a73b 100644 --- a/open-iscsi.spec +++ b/open-iscsi.spec @@ -97,7 +97,7 @@ perl -i -pe 's|^exec_prefix = /$|exec_prefix = %{_exec_prefix}|' Makefile %build %if "%toolchain"=="clang" -CFLAGS="%{optflags} -DUSE_KMOD -Wno-error=unused-command-line-argument -Wno-error=unused-but-set-variable -Wno-error=gnu-variable-sized-type-not-at-end" \ +CFLAGS="%{optflags} -DUSE_KMOD -Wno-error=unused-command-line-argument -Wno-error=gnu-variable-sized-type-not-at-end" \ LDFLAGS="%{?__global_ldflags} -lkmod" \ LIB_DIR=%{_libdir} %make_build -- Gitee From 9372d4d94ccb8f380c18ece3307c228c89efbdd3 Mon Sep 17 00:00:00 2001 From: yuncang123 <1050706328@qq.com> Date: Fri, 20 Sep 2024 09:04:16 +0800 Subject: [PATCH 26/28] m --- ...licit-truncation-from-int-to-one-bit.patch | 25 ------------------- open-iscsi.spec | 3 ++- 2 files changed, 2 insertions(+), 26 deletions(-) delete mode 100644 0030-fix-implicit-truncation-from-int-to-one-bit.patch diff --git a/0030-fix-implicit-truncation-from-int-to-one-bit.patch b/0030-fix-implicit-truncation-from-int-to-one-bit.patch deleted file mode 100644 index 696d55b..0000000 --- a/0030-fix-implicit-truncation-from-int-to-one-bit.patch +++ /dev/null @@ -1,25 +0,0 @@ -From b1decbab06f79f731b5d2893f52786af7f5a6c9b Mon Sep 17 00:00:00 2001 -From: yuncang123 <1050706328@qq.com> -Date: Fri, 6 Sep 2024 00:34:05 +0800 -Subject: [PATCH] fix implicit truncation from int to a one-bit wide bit-field - ---- - usr/mgmt_ipc.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/usr/mgmt_ipc.c b/usr/mgmt_ipc.c -index 054378e..00c0227 100644 ---- a/usr/mgmt_ipc.c -+++ b/usr/mgmt_ipc.c -@@ -501,7 +501,7 @@ void mgmt_ipc_handle(int accept_fd) - return; - } - -- qtask->allocated = 1; -+ qtask->allocated = true; - qtask->mgmt_ipc_fd = fd; - - if (!mgmt_peeruser(fd, user) || strncmp(user, "root", PEERUSER_MAX)) { --- -2.43.0 - diff --git a/open-iscsi.spec b/open-iscsi.spec index 3a0a73b..1265b16 100644 --- a/open-iscsi.spec +++ b/open-iscsi.spec @@ -42,6 +42,7 @@ patch30: 0001-32.patch patch31: 0031-fix-implicit-truncation-from-int-to-one-bit.patch patch32: 0001-33.patch patch33: 0001-rm-unused.patch +patch34: 0001-gnu-variable-sized-type-not-at-end.patch BuildRequires: flex bison doxygen kmod-devel systemd-units gcc git isns-utils-devel systemd-devel BuildRequires: autoconf automake libtool libmount-devel openssl-devel pkg-config @@ -97,7 +98,7 @@ perl -i -pe 's|^exec_prefix = /$|exec_prefix = %{_exec_prefix}|' Makefile %build %if "%toolchain"=="clang" -CFLAGS="%{optflags} -DUSE_KMOD -Wno-error=unused-command-line-argument -Wno-error=gnu-variable-sized-type-not-at-end" \ +CFLAGS="%{optflags} -DUSE_KMOD -Wno-error=unused-command-line-argument" \ LDFLAGS="%{?__global_ldflags} -lkmod" \ LIB_DIR=%{_libdir} %make_build -- Gitee From b0e507f9dd0dffa49582cdb958702917802d7e47 Mon Sep 17 00:00:00 2001 From: yuncang123 <1050706328@qq.com> Date: Fri, 20 Sep 2024 09:31:55 +0800 Subject: [PATCH 27/28] m --- 0001-not-at-end.patch | 66 +++++++++++++++++++++++++++++++++++++++++++ open-iscsi.spec | 4 ++- 2 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 0001-not-at-end.patch diff --git a/0001-not-at-end.patch b/0001-not-at-end.patch new file mode 100644 index 0000000..7062d5b --- /dev/null +++ b/0001-not-at-end.patch @@ -0,0 +1,66 @@ +From 276e3ec747157432874a2553522e3998a115cfa8 Mon Sep 17 00:00:00 2001 +From: yuncang123 <1050706328@qq.com> +Date: Fri, 20 Sep 2024 09:30:41 +0800 +Subject: [PATCH] not at end + +--- + usr/initiator.h | 6 +++--- + usr/mgmt_ipc.h | 2 +- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/usr/initiator.h b/usr/initiator.h +index a1757eb..e9b892e 100644 +--- a/usr/initiator.h ++++ b/usr/initiator.h +@@ -183,12 +183,12 @@ struct iscsi_ev_context { + typedef struct queue_task { + iscsi_conn_t *conn; + iscsiadm_req_t req; +- iscsiadm_rsp_t rsp; + int mgmt_ipc_fd; + unsigned int allocated : 1; + /* Newer request types include a + * variable-length payload */ + void *payload; ++ iscsiadm_rsp_t rsp; + } queue_task_t; + + struct iscsi_transport_template; +@@ -250,10 +250,9 @@ typedef struct iscsi_session { + /* connection reopens during recovery */ + int reopen_cnt; + int reopen_max; +- queue_task_t reopen_qtask; ++ + iscsi_session_r_stage_e r_stage; + uint32_t replacement_timeout; +- + int host_reset_timeout; + int tgt_reset_timeout; + int lu_reset_timeout; +@@ -264,6 +263,7 @@ typedef struct iscsi_session { + * is complete + */ + queue_task_t *notify_qtask; ++ queue_task_t reopen_qtask; + } iscsi_session_t; + + #define INVALID_SESSION_ID (uint32_t)-1 +diff --git a/usr/mgmt_ipc.h b/usr/mgmt_ipc.h +index 55972ed..da06170 100644 +--- a/usr/mgmt_ipc.h ++++ b/usr/mgmt_ipc.h +@@ -92,9 +92,9 @@ typedef struct iscsiadm_rsp { + ISCSI_STATS_CUSTOM_MAX) + struct ipc_msg_getstats { + struct iscsi_uevent ev; +- struct iscsi_stats stats; + char custom[sizeof(struct iscsi_stats_custom) * + ISCSI_STATS_CUSTOM_MAX]; ++ struct iscsi_stats stats; + } getstats; + struct ipc_msg_config { + char var[VALUE_MAXLEN]; +-- +2.43.0 + diff --git a/open-iscsi.spec b/open-iscsi.spec index 1265b16..e89ba88 100644 --- a/open-iscsi.spec +++ b/open-iscsi.spec @@ -42,7 +42,9 @@ patch30: 0001-32.patch patch31: 0031-fix-implicit-truncation-from-int-to-one-bit.patch patch32: 0001-33.patch patch33: 0001-rm-unused.patch -patch34: 0001-gnu-variable-sized-type-not-at-end.patch +patch34: 0001-not-at-end.patch + + BuildRequires: flex bison doxygen kmod-devel systemd-units gcc git isns-utils-devel systemd-devel BuildRequires: autoconf automake libtool libmount-devel openssl-devel pkg-config -- Gitee From 93fc0e91a6b1c8c957ba297ea24d641626502448 Mon Sep 17 00:00:00 2001 From: yuncang123 <1050706328@qq.com> Date: Fri, 20 Sep 2024 11:27:59 +0800 Subject: [PATCH 28/28] m --- 0001-gnu-variable-sized-type-not-at-end.patch | 62 ------------------- 0001-rm-unused-but-set-variable.patch | 24 ------- 0001-32.patch => 0030-attribute.patch | 0 0001-33.patch => 0032-include-uio.h.patch | 0 0001-rm-unused.patch => 0033-rm-unused.patch | 0 ...-not-at-end.patch => 0034-not-at-end.patch | 0 open-iscsi.spec | 10 ++- 7 files changed, 4 insertions(+), 92 deletions(-) delete mode 100644 0001-gnu-variable-sized-type-not-at-end.patch delete mode 100644 0001-rm-unused-but-set-variable.patch rename 0001-32.patch => 0030-attribute.patch (100%) rename 0001-33.patch => 0032-include-uio.h.patch (100%) rename 0001-rm-unused.patch => 0033-rm-unused.patch (100%) rename 0001-not-at-end.patch => 0034-not-at-end.patch (100%) diff --git a/0001-gnu-variable-sized-type-not-at-end.patch b/0001-gnu-variable-sized-type-not-at-end.patch deleted file mode 100644 index 365a5ee..0000000 --- a/0001-gnu-variable-sized-type-not-at-end.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 05bbd8dbd9d694472c16e4b642107ab44f2e784f Mon Sep 17 00:00:00 2001 -From: yuncang123 <1050706328@qq.com> -Date: Wed, 18 Sep 2024 16:29:34 +0800 -Subject: [PATCH] gnu-variable-sized-type-not-at-end - ---- - usr/initiator.h | 4 ++-- - usr/mgmt_ipc.h | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/usr/initiator.h b/usr/initiator.h -index dbf6f2b..fe4bd3c 100644 ---- a/usr/initiator.h -+++ b/usr/initiator.h -@@ -183,12 +183,12 @@ struct iscsi_ev_context { - typedef struct queue_task { - iscsi_conn_t *conn; - iscsiadm_req_t req; -- iscsiadm_rsp_t rsp; - int mgmt_ipc_fd; - int allocated : 1; - /* Newer request types include a - * variable-length payload */ - void *payload; -+ iscsiadm_rsp_t rsp; - } queue_task_t; - - struct iscsi_transport_template; -@@ -250,7 +250,6 @@ typedef struct iscsi_session { - /* connection reopens during recovery */ - int reopen_cnt; - int reopen_max; -- queue_task_t reopen_qtask; - iscsi_session_r_stage_e r_stage; - uint32_t replacement_timeout; - -@@ -264,6 +263,7 @@ typedef struct iscsi_session { - * is complete - */ - queue_task_t *notify_qtask; -+ queue_task_t reopen_qtask; - } iscsi_session_t; - - #define INVALID_SESSION_ID (uint32_t)-1 -diff --git a/usr/mgmt_ipc.h b/usr/mgmt_ipc.h -index 55972ed..25a79a4 100644 ---- a/usr/mgmt_ipc.h -+++ b/usr/mgmt_ipc.h -@@ -92,9 +92,9 @@ typedef struct iscsiadm_rsp { - ISCSI_STATS_CUSTOM_MAX) - struct ipc_msg_getstats { - struct iscsi_uevent ev; -- struct iscsi_stats stats; - char custom[sizeof(struct iscsi_stats_custom) * - ISCSI_STATS_CUSTOM_MAX]; -+ struct iscsi_stats stats; - } getstats; - struct ipc_msg_config { - char var[VALUE_MAXLEN]; --- -2.43.0 - diff --git a/0001-rm-unused-but-set-variable.patch b/0001-rm-unused-but-set-variable.patch deleted file mode 100644 index 49331cc..0000000 --- a/0001-rm-unused-but-set-variable.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 719e83f6a77b1a0fb8458f59e93e0eb76cddc4b9 Mon Sep 17 00:00:00 2001 -From: yuncang123 <1050706328@qq.com> -Date: Wed, 18 Sep 2024 23:28:40 +0800 -Subject: [PATCH] rm-unused-but-set-variable - ---- - usr/discovery.c | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/usr/discovery.c b/usr/discovery.c -index 7dec696..10e12a2 100644 ---- a/usr/discovery.c -+++ b/usr/discovery.c -@@ -695,7 +695,6 @@ process_sendtargets_response(struct str_buffer *sendtargets, - char *end = text + str_data_length(sendtargets); - char *nul = end - 1; - char *record = NULL; -- int num_targets = 0; - - if (start == end) { - /* no SendTargets data */ --- -2.43.0 - diff --git a/0001-32.patch b/0030-attribute.patch similarity index 100% rename from 0001-32.patch rename to 0030-attribute.patch diff --git a/0001-33.patch b/0032-include-uio.h.patch similarity index 100% rename from 0001-33.patch rename to 0032-include-uio.h.patch diff --git a/0001-rm-unused.patch b/0033-rm-unused.patch similarity index 100% rename from 0001-rm-unused.patch rename to 0033-rm-unused.patch diff --git a/0001-not-at-end.patch b/0034-not-at-end.patch similarity index 100% rename from 0001-not-at-end.patch rename to 0034-not-at-end.patch diff --git a/open-iscsi.spec b/open-iscsi.spec index e89ba88..7980675 100644 --- a/open-iscsi.spec +++ b/open-iscsi.spec @@ -38,13 +38,11 @@ patch26: 0026-iscsid-clear-scanning-thread-s-PR_SET_IO_FLUSHER-fla.patch patch27: 0027-iscsid-stop-connection-for-recovery-if-error-is-not-.patch patch28: 0028-discoveryd-fix-format-overflow-warning-413.patch patch29: 0029-backport-fix-missing-underline-in-iscsid_req.h.patch -patch30: 0001-32.patch +patch30: 0030-attribute.patch patch31: 0031-fix-implicit-truncation-from-int-to-one-bit.patch -patch32: 0001-33.patch -patch33: 0001-rm-unused.patch -patch34: 0001-not-at-end.patch - - +patch32: 0032-include-uio.h.patch +patch33: 0033-rm-unused.patch +patch34: 0034-not-at-end.patch BuildRequires: flex bison doxygen kmod-devel systemd-units gcc git isns-utils-devel systemd-devel BuildRequires: autoconf automake libtool libmount-devel openssl-devel pkg-config -- Gitee