Browse Source

open-iscsi: update to 2.1.3

pass CC to configure. host CC flags can leak in the build system,
preventing compilation.

Deleted upstream backports.

Refreshed patches.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
lilik-openwrt-22.03
Rosen Penev 3 years ago
parent
commit
9f217ae3f9
No known key found for this signature in database GPG Key ID: 36D31CFA845F0E3B
10 changed files with 32 additions and 388 deletions
  1. +4
    -3
      net/open-iscsi/Makefile
  2. +5
    -9
      net/open-iscsi/patches/0002-idmb_rec_write-check-for-tpgt-first.patch
  3. +13
    -18
      net/open-iscsi/patches/0003-idbm_rec_write-seperate-old-and-new-style-writes.patch
  4. +2
    -5
      net/open-iscsi/patches/0004-idbw_rec_write-pick-tpgt-from-existing-record.patch
  5. +3
    -8
      net/open-iscsi/patches/0015-remove-the-offload-boot-supported-ifdef.patch
  6. +5
    -20
      net/open-iscsi/patches/0019-Coverity-scan-fixes.patch
  7. +0
    -62
      net/open-iscsi/patches/0023-iscsi_if.h-replace-zero-length-array-with-flexible-a.patch
  8. +0
    -65
      net/open-iscsi/patches/01-fixiscsi_iname_core_dumps.patch
  9. +0
    -173
      net/open-iscsi/patches/02-change_include_poll_h.patch
  10. +0
    -25
      net/open-iscsi/patches/03-ignore_iface_example.patch

+ 4
- 3
net/open-iscsi/Makefile View File

@ -4,12 +4,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=open-iscsi
PKG_VERSION:=2.1.1
PKG_RELEASE:=2
PKG_VERSION:=2.1.3
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/open-iscsi/open-iscsi/tar.gz/$(PKG_VERSION)?
PKG_HASH:=dfc1ea37f230f9d116f5b39c795b35be43002d65c81330ccd3878786532b811b
PKG_HASH:=5410474b23552016220d04aa181903cb50ae988f29e99cb03f3e2de86a109be4
PKG_MAINTAINER:=Lucian CRISTIAN <lucian.cristian@gmail.com>
PKG_LICENSE:=GPL-2.0-or-later
@ -52,6 +52,7 @@ define Build/Configure
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
LIB_DIR=/usr/lib \
CC="$(TARGET_CC)" \
CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
)
endef


+ 5
- 9
net/open-iscsi/patches/0002-idmb_rec_write-check-for-tpgt-first.patch View File

@ -10,11 +10,9 @@ for splitting it up.
usr/idbm.c | 18 +++++-------------
1 file changed, 5 insertions(+), 13 deletions(-)
diff --git a/usr/idbm.c b/usr/idbm.c
index be4d4e3..a7da540 100644
--- a/usr/idbm.c
+++ b/usr/idbm.c
@@ -2078,6 +2078,10 @@ static int idbm_rec_write(node_rec_t *rec, bool disable_lock)
@@ -2178,6 +2178,10 @@ static int idbm_rec_write(node_rec_t *re
goto free_portal;
}
@ -25,7 +23,7 @@ index be4d4e3..a7da540 100644
rc = stat(portal, &statb);
if (rc) {
rc = 0;
@@ -2086,22 +2090,10 @@ static int idbm_rec_write(node_rec_t *rec, bool disable_lock)
@@ -2186,23 +2190,11 @@ static int idbm_rec_write(node_rec_t *re
* set the tgpt. In new versions you must pass all the info in
* from the start
*/
@ -38,7 +36,7 @@ index be4d4e3..a7da540 100644
}
if (!S_ISDIR(statb.st_mode)) {
- /*
/*
- * older iscsiadm versions had you create the config then set
- * set the tgpt. In new versions you must pass all the info in
- * from the start
@ -46,9 +44,7 @@ index be4d4e3..a7da540 100644
- if (rec->tpgt == PORTAL_GROUP_TAG_UNKNOWN)
- /* drop down to old style portal as config */
- goto open_conf;
/*
- /*
* Old style portal as a file, but with tpgt. Let's update it.
*/
--
2.21.0
if (unlink(portal)) {

+ 13
- 18
net/open-iscsi/patches/0003-idbm_rec_write-seperate-old-and-new-style-writes.patch View File

@ -8,11 +8,9 @@ Duplicates a small bit of code, but easier to understand and extened.
usr/idbm.c | 129 +++++++++++++++++++++++++++++++++++------------------
1 file changed, 86 insertions(+), 43 deletions(-)
diff --git a/usr/idbm.c b/usr/idbm.c
index a7da540..2f5e309 100644
--- a/usr/idbm.c
+++ b/usr/idbm.c
@@ -2030,12 +2030,7 @@ mkdir_portal:
@@ -2130,12 +2130,7 @@ mkdir_portal:
return f;
}
@ -26,7 +24,7 @@ index a7da540..2f5e309 100644
{
struct stat statb;
FILE *f;
@@ -2048,39 +2043,8 @@ static int idbm_rec_write(node_rec_t *rec, bool disable_lock)
@@ -2148,39 +2143,8 @@ static int idbm_rec_write(node_rec_t *re
return ISCSI_ERR_NOMEM;
}
@ -66,7 +64,7 @@ index a7da540..2f5e309 100644
rc = stat(portal, &statb);
if (rc) {
@@ -2101,11 +2065,11 @@ static int idbm_rec_write(node_rec_t *rec, bool disable_lock)
@@ -2201,11 +2165,11 @@ static int idbm_rec_write(node_rec_t *re
log_error("Could not convert %s: %s", portal,
strerror(errno));
rc = ISCSI_ERR_IDBM;
@ -80,7 +78,7 @@ index a7da540..2f5e309 100644
}
mkdir_portal:
@@ -2116,24 +2080,103 @@ mkdir_portal:
@@ -2216,24 +2180,103 @@ mkdir_portal:
log_error("Could not make dir %s: %s",
portal, strerror(errno));
rc = ISCSI_ERR_IDBM;
@ -100,11 +98,10 @@ index a7da540..2f5e309 100644
rc = ISCSI_ERR_IDBM;
- goto unlock;
+ goto free_portal;
}
idbm_print(IDBM_PRINT_TYPE_NODE, rec, 1, f);
fclose(f);
-unlock:
+ }
+
+ idbm_print(IDBM_PRINT_TYPE_NODE, rec, 1, f);
+ fclose(f);
+free_portal:
+ free(portal);
+ return rc;
@ -120,18 +117,19 @@ index a7da540..2f5e309 100644
+ if (!portal) {
+ log_error("Could not alloc portal");
+ return ISCSI_ERR_NOMEM;
+ }
}
+ snprintf(portal, PATH_MAX, "%s/%s/%s,%d", NODE_CONFIG_DIR,
+ rec->name, rec->conn[0].address, rec->conn[0].port);
+
+ f = fopen(portal, "w");
+ if (!f) {
+ log_error("Could not open %s: %sd", portal, strerror(errno));
+ rc = ISCSI_ERR_IDBM;
+ goto free_portal;
+ }
+ idbm_print(IDBM_PRINT_TYPE_NODE, rec, 1, f);
+ fclose(f);
idbm_print(IDBM_PRINT_TYPE_NODE, rec, 1, f);
fclose(f);
-unlock:
+free_portal:
+ free(portal);
+ return rc;
@ -188,6 +186,3 @@ index a7da540..2f5e309 100644
if (!disable_lock)
idbm_unlock();
free_portal:
--
2.21.0

+ 2
- 5
net/open-iscsi/patches/0004-idbw_rec_write-pick-tpgt-from-existing-record.patch View File

@ -11,8 +11,6 @@ updated new style record instead.
usr/idbm.c | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/usr/idbm.c b/usr/idbm.c
index b6193e7..2208c4a 100644
--- a/usr/idbm.c
+++ b/usr/idbm.c
@@ -28,6 +28,7 @@
@ -34,7 +32,7 @@ index b6193e7..2208c4a 100644
#define IDBM_HIDE 0 /* Hide parameter when print. */
#define IDBM_SHOW 1 /* Show parameter when print. */
#define IDBM_MASKED 2 /* Show "stars" instead of real value when print */
@@ -202,6 +207,8 @@ static struct int_list_tbl {
@@ -203,6 +208,8 @@ static struct int_list_tbl {
{ "SHA3-256", AUTH_CHAP_ALG_SHA3_256 },
};
@ -43,7 +41,7 @@ index b6193e7..2208c4a 100644
static void
idbm_recinfo_discovery(discovery_rec_t *r, recinfo_t *ri)
{
@@ -2206,12 +2213,49 @@ static int idbm_rec_write_old(node_rec_t *rec)
@@ -2207,12 +2214,49 @@ static int idbm_rec_write_old(node_rec_t
FILE *f;
char *portal;
int rc = 0;
@ -93,4 +91,3 @@ index b6193e7..2208c4a 100644
snprintf(portal, PATH_MAX, "%s/%s/%s,%d", NODE_CONFIG_DIR,
rec->name, rec->conn[0].address, rec->conn[0].port);

+ 3
- 8
net/open-iscsi/patches/0015-remove-the-offload-boot-supported-ifdef.patch View File

@ -7,11 +7,9 @@ Subject: [PATCH] remove the offload boot supported ifdef
usr/iface.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/usr/iface.c b/usr/iface.c
index 645b0b8..9cd07fd 100644
--- a/usr/iface.c
+++ b/usr/iface.c
@@ -993,6 +993,7 @@ int iface_setup_from_boot_context(struct iface_rec *iface,
@@ -998,6 +998,7 @@ int iface_setup_from_boot_context(struct
{
struct iscsi_transport *t = NULL;
uint32_t hostno;
@ -19,7 +17,7 @@ index 645b0b8..9cd07fd 100644
if (strlen(context->initiatorname))
strlcpy(iface->iname, context->initiatorname,
@@ -1006,10 +1007,7 @@ int iface_setup_from_boot_context(struct iface_rec *iface,
@@ -1011,10 +1012,7 @@ int iface_setup_from_boot_context(struct
return 0;
}
} else if (strlen(context->iface)) {
@ -30,7 +28,7 @@ index 645b0b8..9cd07fd 100644
memset(transport_name, 0, ISCSI_TRANSPORT_NAME_MAXLEN);
/* make sure offload driver is loaded */
@@ -1035,9 +1033,6 @@ int iface_setup_from_boot_context(struct iface_rec *iface,
@@ -1040,9 +1038,6 @@ int iface_setup_from_boot_context(struct
}
strlcpy(iface->netdev, context->iface, sizeof(iface->netdev));
@ -40,6 +38,3 @@ index 645b0b8..9cd07fd 100644
} else
return 0;
--
2.21.0

+ 5
- 20
net/open-iscsi/patches/0019-Coverity-scan-fixes.patch View File

@ -12,11 +12,9 @@ Subject: [PATCH 1/1] Coverity scan fixes
usr/iscsid.c | 2 +-
6 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/iscsiuio/src/unix/libs/qedi.c b/iscsiuio/src/unix/libs/qedi.c
index 3414cb5..a359700 100644
--- a/iscsiuio/src/unix/libs/qedi.c
+++ b/iscsiuio/src/unix/libs/qedi.c
@@ -1023,7 +1023,7 @@ static int qedi_read(nic_t *nic, packet_t *pkt)
@@ -1030,7 +1030,7 @@ static int qedi_read(nic_t *nic, packet_
LOG_DEBUG(PFX "%s:hw_prod %d bd_prod %d, rx_pkt_idx %d, rxlen %d",
nic->log_name, hw_prod, bd_prod, rx_bd->rx_pkt_index, len);
@ -25,8 +23,6 @@ index 3414cb5..a359700 100644
nic->log_name, sw_cons, bd_cons, QEDI_NUM_RX_BD);
if (bd_cons != bd_prod) {
diff --git a/iscsiuio/src/unix/main.c b/iscsiuio/src/unix/main.c
index 0c9ad49..f83f305 100644
--- a/iscsiuio/src/unix/main.c
+++ b/iscsiuio/src/unix/main.c
@@ -391,6 +391,9 @@ int main(int argc, char *argv[])
@ -39,11 +35,9 @@ index 0c9ad49..f83f305 100644
/* Spin off the signal handling thread */
pthread_attr_init(&attr);
diff --git a/libopeniscsiusr/idbm.c b/libopeniscsiusr/idbm.c
index 7bc2381..7d4c338 100644
--- a/libopeniscsiusr/idbm.c
+++ b/libopeniscsiusr/idbm.c
@@ -321,12 +321,11 @@ int _idbm_lock(struct iscsi_context *ctx)
@@ -321,12 +321,11 @@ int _idbm_lock(struct iscsi_context *ctx
return 0;
}
@ -61,11 +55,9 @@ index 7bc2381..7d4c338 100644
}
fd = open(LOCK_FILE, O_RDWR | O_CREAT, 0666);
diff --git a/usr/idbm.c b/usr/idbm.c
index d5e16cb..a210c88 100644
--- a/usr/idbm.c
+++ b/usr/idbm.c
@@ -1438,12 +1438,10 @@ int idbm_lock(void)
@@ -1439,12 +1439,10 @@ int idbm_lock(void)
return 0;
}
@ -82,11 +74,9 @@ index d5e16cb..a210c88 100644
}
fd = open(LOCK_FILE, O_RDWR | O_CREAT, 0666);
diff --git a/usr/iscsid.c b/usr/iscsid.c
index 99d27ab..dbb0900 100644
--- a/usr/iscsid.c
+++ b/usr/iscsid.c
@@ -490,8 +490,8 @@ int main(int argc, char *argv[])
@@ -495,8 +495,8 @@ int main(int argc, char *argv[])
log_close(log_pid);
exit(ISCSI_ERR);
}
@ -96,11 +86,9 @@ index 99d27ab..dbb0900 100644
if ((control_fd = ipc->ctldev_open()) < 0) {
log_close(log_pid);
diff --git a/usr/initiator.c b/usr/initiator.c
index a07f9aa..a06760c 100644
--- a/usr/initiator.c
+++ b/usr/initiator.c
@@ -580,7 +580,7 @@ __session_conn_reopen(iscsi_conn_t *conn, queue_task_t *qtask, int do_stop,
@@ -580,7 +580,7 @@ __session_conn_reopen(iscsi_conn_t *conn
int redirected)
{
iscsi_session_t *session = conn->session;
@ -109,6 +97,3 @@ index a07f9aa..a06760c 100644
log_debug(1, "re-opening session %d (reopen_cnt %d)", session->id,
session->reopen_cnt);
--
2.21.1

+ 0
- 62
net/open-iscsi/patches/0023-iscsi_if.h-replace-zero-length-array-with-flexible-a.patch View File

@ -1,62 +0,0 @@
From d4ed4972df1ffe9381e33f2800f8e574f632948c Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
Date: Mon, 2 Mar 2020 15:21:30 -0800
Subject: [PATCH 1/1] iscsi_if.h replace zero-length array with flexible-array
member
---
include/iscsi_if.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/include/iscsi_if.h b/include/iscsi_if.h
index 2d46214..e8cee0d 100644
--- a/include/iscsi_if.h
+++ b/include/iscsi_if.h
@@ -337,7 +337,7 @@ enum iscsi_param_type {
struct iscsi_param_info {
uint32_t len; /* Actual length of the param value */
uint16_t param; /* iscsi param */
- uint8_t value[0]; /* length sized value follows */
+ uint8_t value[]; /* length sized value follows */
} __attribute__((__packed__));
struct iscsi_iface_param_info {
@@ -346,7 +346,7 @@ struct iscsi_iface_param_info {
uint16_t param; /* iscsi param value */
uint8_t iface_type; /* IPv4 or IPv6 */
uint8_t param_type; /* iscsi_param_type */
- uint8_t value[0]; /* length sized value follows */
+ uint8_t value[]; /* length sized value follows */
} __attribute__((__packed__));
/*
@@ -723,7 +723,7 @@ enum iscsi_flashnode_param {
struct iscsi_flashnode_param_info {
uint32_t len; /* Actual length of the param */
uint16_t param; /* iscsi param value */
- uint8_t value[0]; /* length sized value follows */
+ uint8_t value[]; /* length sized value follows */
} __attribute__((__packed__));
enum iscsi_discovery_parent_type {
@@ -841,7 +841,7 @@ struct iscsi_stats {
* up to ISCSI_STATS_CUSTOM_MAX
*/
uint32_t custom_length;
- struct iscsi_stats_custom custom[0]
+ struct iscsi_stats_custom custom[]
__attribute__ ((aligned (sizeof(uint64_t))));
};
@@ -972,7 +972,7 @@ struct iscsi_offload_host_stats {
* up to ISCSI_HOST_STATS_CUSTOM_MAX
*/
uint32_t custom_length;
- struct iscsi_host_stats_custom custom[0]
+ struct iscsi_host_stats_custom custom[]
__attribute__ ((aligned (sizeof(uint64_t))));
};
--
2.21.1

+ 0
- 65
net/open-iscsi/patches/01-fixiscsi_iname_core_dumps.patch View File

@ -1,65 +0,0 @@
From b32f59619c32ed6cd136194d92c649b74926c6f2 Mon Sep 17 00:00:00 2001
From: Lee Duncan <lduncan@suse.com>
Date: Wed, 25 Mar 2020 18:00:50 -0700
Subject: [PATCH] Fix issue where "iscsi-iname -p" core dumps.
While I was at it, I made the usage message a function
and made it print to stderr insted of stdout.
---
utils/Makefile | 2 +-
utils/iscsi-iname.c | 17 +++++++++++++----
2 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/utils/Makefile b/utils/Makefile
index f65f1e79..aed3bb0a 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -1,7 +1,7 @@
# This Makefile will work only with GNU make.
CFLAGS ?= -O2 -fno-inline -g
-CFLAGS += -Wall -Wstrict-prototypes
+CFLAGS += -Wall -Wextra -Wstrict-prototypes
PROGRAMS = iscsi-iname
all: $(PROGRAMS)
diff --git a/utils/iscsi-iname.c b/utils/iscsi-iname.c
index da850dca..0f587e1e 100644
--- a/utils/iscsi-iname.c
+++ b/utils/iscsi-iname.c
@@ -40,6 +40,13 @@
* a seperator and 12 characters (6 random bytes in hex representation) */
#define PREFIX_MAX_LEN 210
+static void usage(void)
+{
+ fprintf(stderr, "Usage: iscsi-iname [-h | --help | -p <prefix>]\n");
+ fprintf(stderr, "where <prefix> has max length of %d\n",
+ PREFIX_MAX_LEN);
+}
+
int
main(int argc, char *argv[])
{
@@ -68,15 +75,17 @@ main(int argc, char *argv[])
"on every invocation.\n");
exit(0);
} else if ( strcmp(prefix, "-p") == 0 ) {
+ if (argc != 3) {
+ usage();
+ exit(1);
+ }
prefix = argv[2];
if (strnlen(prefix, PREFIX_MAX_LEN + 1) > PREFIX_MAX_LEN) {
- printf("Error: Prefix cannot exceed %d "
- "characters.\n", PREFIX_MAX_LEN);
+ usage();
exit(1);
}
} else {
- printf("\nUsage: iscsi-iname [-h | --help | "
- "-p <prefix>]\n");
+ usage();
exit(0);
}
} else {

+ 0
- 173
net/open-iscsi/patches/02-change_include_poll_h.patch View File

@ -1,173 +0,0 @@
From 6ed14d48f6e9a8dfb37cc68472b04cfb3673b7bd Mon Sep 17 00:00:00 2001
From: Lee Duncan <lduncan@suse.com>
Date: Fri, 27 Mar 2020 17:50:41 -0700
Subject: [PATCH 1/3] Change include of <sys/poll.h> to <poll.h>
The proper local is <poll.h>.
---
iscsiuio/src/unix/nic_nl.c | 2 +-
usr/discovery.c | 2 +-
usr/event_poll.c | 2 +-
usr/io.c | 2 +-
usr/netlink.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/iscsiuio/src/unix/nic_nl.c b/iscsiuio/src/unix/nic_nl.c
index f8306563..dee462e7 100644
--- a/iscsiuio/src/unix/nic_nl.c
+++ b/iscsiuio/src/unix/nic_nl.c
@@ -50,7 +50,7 @@
#include <linux/netlink.h>
#include <iscsi_if.h>
#include <sys/ioctl.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <sys/types.h>
#include <sys/user.h>
#include <sys/socket.h>
diff --git a/usr/discovery.c b/usr/discovery.c
index 9ce122e1..7dec696f 100644
--- a/usr/discovery.c
+++ b/usr/discovery.c
@@ -25,7 +25,7 @@
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <sys/time.h>
#include <sys/param.h>
#include <sys/socket.h>
diff --git a/usr/event_poll.c b/usr/event_poll.c
index 4cf4ce2b..ffd12a37 100644
--- a/usr/event_poll.c
+++ b/usr/event_poll.c
@@ -23,7 +23,7 @@
*/
#include <stdlib.h>
#include <errno.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/signalfd.h>
diff --git a/usr/io.c b/usr/io.c
index 210a10ad..a46c9f8c 100644
--- a/usr/io.c
+++ b/usr/io.c
@@ -24,7 +24,7 @@
#include <signal.h>
#include <unistd.h>
#include <fcntl.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <sys/ioctl.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
diff --git a/usr/netlink.c b/usr/netlink.c
index d42ca4fb..22cad834 100644
--- a/usr/netlink.c
+++ b/usr/netlink.c
@@ -30,7 +30,7 @@
#include <asm/types.h>
#include <sys/socket.h>
#include <sys/types.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <linux/netlink.h>
#include "types.h"
From fbe6c1c766a88edccb0d7f4168d2d87a3cdb4660 Mon Sep 17 00:00:00 2001
From: Lee Duncan <lduncan@suse.com>
Date: Fri, 27 Mar 2020 17:57:52 -0700
Subject: [PATCH 2/3] Fix type mismatch under musl.
It complains about rl.rlim_cur and rl.rlim_max being
long long unsigned, so cast them, since it's debug
messages anyway.
---
usr/iscsi_util.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/usr/iscsi_util.c b/usr/iscsi_util.c
index fd8fc0cf..db1dc377 100644
--- a/usr/iscsi_util.c
+++ b/usr/iscsi_util.c
@@ -152,7 +152,9 @@ int increase_max_files(void)
log_debug(1, "Could not get file limit (err %d)", errno);
return errno;
}
- log_debug(1, "Max file limits %lu %lu", rl.rlim_cur, rl.rlim_max);
+ log_debug(1, "Max file limits %lu %lu",
+ (long unsigned)rl.rlim_cur,
+ (long unsigned)rl.rlim_max);
if (rl.rlim_cur < ISCSI_MAX_FILES)
rl.rlim_cur = ISCSI_MAX_FILES;
@@ -162,7 +164,8 @@ int increase_max_files(void)
err = setrlimit(RLIMIT_NOFILE, &rl);
if (err) {
log_debug(1, "Could not set file limit to %lu/%lu (err %d)",
- rl.rlim_cur, rl.rlim_max, errno);
+ (long unsigned)rl.rlim_cur,
+ (long unsigned)rl.rlim_max, errno);
return errno;
}
From a93c2f1cf5a55887074bdda65aa6ad6c533191f0 Mon Sep 17 00:00:00 2001
From: Lee Duncan <lduncan@suse.com>
Date: Sun, 29 Mar 2020 11:01:07 -0700
Subject: [PATCH 3/3] More changes for musl.
Clean up some code that musl complains about. The
changes all seem like a good idea in general, and
should not effect functionality.
---
usr/iscsistart.c | 1 -
usr/mgmt_ipc.c | 1 +
usr/statics.c | 3 +--
3 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/usr/iscsistart.c b/usr/iscsistart.c
index 00a9c78a..ee810f7a 100644
--- a/usr/iscsistart.c
+++ b/usr/iscsistart.c
@@ -30,7 +30,6 @@
#include <time.h>
#include <sys/mman.h>
#include <sys/utsname.h>
-#include <sys/signal.h>
#include <sys/types.h>
#include <sys/wait.h>
diff --git a/usr/mgmt_ipc.c b/usr/mgmt_ipc.c
index 51267c13..c292161f 100644
--- a/usr/mgmt_ipc.c
+++ b/usr/mgmt_ipc.c
@@ -26,6 +26,7 @@
#include <unistd.h>
#include <pwd.h>
#include <sys/un.h>
+#include <string.h>
#include "iscsid.h"
#include "idbm.h"
diff --git a/usr/statics.c b/usr/statics.c
index 59fb044d..f59729ba 100644
--- a/usr/statics.c
+++ b/usr/statics.c
@@ -1,6 +1,6 @@
#include <unistd.h>
#include <pwd.h>
-#include <sys/errno.h>
+#include <errno.h>
#include <sys/types.h>
static struct passwd root_pw = {
@@ -17,4 +17,3 @@ getpwuid(uid_t uid)
return 0;
}
}
-

+ 0
- 25
net/open-iscsi/patches/03-ignore_iface_example.patch View File

@ -1,25 +0,0 @@
From 16d4899d52b3b88774ac6d9b3cc0f5626f4705da Mon Sep 17 00:00:00 2001
From: Lee Duncan <lduncan@suse.com>
Date: Tue, 19 Nov 2019 07:54:41 -0800
Subject: [PATCH] Ignore iface.example in iface match checks
Just a cleanup, as looking at the example file
didn't hurt anything, but did waste our time.
---
usr/iface.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/usr/iface.c b/usr/iface.c
index 323f1675..11f3d2ac 100644
--- a/usr/iface.c
+++ b/usr/iface.c
@@ -905,6 +905,9 @@ int iface_for_each_iface(void *data, int skip_def, int *nr_found,
!strcmp(iface_dent->d_name, ".."))
continue;
+ if (!strcmp(iface_dent->d_name, "iface.example"))
+ continue;
+
log_debug(5, "iface_for_each_iface found %s",
iface_dent->d_name);
iface = iface_alloc(iface_dent->d_name, &err);

Loading…
Cancel
Save