You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

110 lines
4.7 KiB

From e186e959ddc2a47e7cfe1f5a8ea4d3fa8248a478 Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
Date: Wed, 30 May 2018 16:08:30 -0700
Subject: [PATCH] use /var/lib/iscsi in libopeniscsiusr
---
libopeniscsiusr/idbm.h | 3 ++-
libopeniscsiusr/iface.c | 2 +-
libopeniscsiusr/libopeniscsiusr/libopeniscsiusr.h | 8 ++++----
libopeniscsiusr/libopeniscsiusr/libopeniscsiusr_iface.h | 2 +-
libopeniscsiusr/node.h | 2 +-
5 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/libopeniscsiusr/idbm.h b/libopeniscsiusr/idbm.h
index cc90388..5a4d2fa 100644
--- a/libopeniscsiusr/idbm.h
+++ b/libopeniscsiusr/idbm.h
@@ -31,7 +31,8 @@
#include "libopeniscsiusr/libopeniscsiusr_common.h"
#define ISCSI_CONFIG_ROOT "/etc/iscsi/"
-#define IFACE_CONFIG_DIR ISCSI_CONFIG_ROOT"ifaces"
+#define ISCSI_VAR_LIB "/var/lib/iscsi/"
+#define IFACE_CONFIG_DIR ISCSI_VAR_LIB"ifaces"
#define AUTH_STR_MAX_LEN 256
#define BOOT_NAME_MAXLEN 256
#define IDBM_DUMP_SIZE 8192
diff --git a/libopeniscsiusr/iface.c b/libopeniscsiusr/iface.c
index e7938a5..99ab7b5 100644
--- a/libopeniscsiusr/iface.c
+++ b/libopeniscsiusr/iface.c
@@ -381,7 +381,7 @@ int iscsi_default_iface_setup(struct iscsi_context *ctx)
_good(_iscsi_hids_get(ctx, &hids, &hid_count), rc, out);
for (i = 0; i < hid_count; ++i) {
- /* Create /etc/iscsi/ifaces/<iface_name> file if not found
+ /* Create /var/lib/iscsi/ifaces/<iface_name> file if not found
*/
_good(_iscsi_ifaces_get_from_sysfs(ctx, hids[i], &ifaces, &iface_count),
rc, out);
diff --git a/libopeniscsiusr/libopeniscsiusr/libopeniscsiusr.h b/libopeniscsiusr/libopeniscsiusr/libopeniscsiusr.h
index 4395902..81582da 100644
--- a/libopeniscsiusr/libopeniscsiusr/libopeniscsiusr.h
+++ b/libopeniscsiusr/libopeniscsiusr/libopeniscsiusr.h
@@ -339,7 +339,7 @@ __DLL_EXPORT void iscsi_session_free(struct iscsi_session *se);
* * bnx2i
*
* It will also create configuration files for iSCSI hardware offload cards in
- * /etc/iscsi/ifaces/<iface_name>.
+ * /var/lib/iscsi/ifaces/<iface_name>.
*
* @ctx:
* Pointer of 'struct iscsi_context'.
@@ -369,7 +369,7 @@ __DLL_EXPORT int iscsi_default_iface_setup(struct iscsi_context *ctx);
* Retrieves all iSCSI interfaces. For the properties of 'struct iscsi_iface',
* please refer to the functions defined in 'libopeniscsiusr_iface.h' file.
* The returned results contains default iSCSI interfaces(iser and iscsi_tcp)
- * and iSCSI interfaces configured in "/etc/iscsi/ifaces/".
+ * and iSCSI interfaces configured in "/var/lib/iscsi/ifaces/".
* Illegal configuration file will be skipped and warned.
* To generate iSCSI interface configuration when new card installed, please
* use iscsi_default_iface_setup().
@@ -427,7 +427,7 @@ __DLL_EXPORT void iscsi_ifaces_free(struct iscsi_iface **ifaces,
* iscsi_iface_get() - Retrieve specified iSCSI interface.
*
* Retrieves specified iSCSI interfaces by reading configuration from
- * "/etc/iscsi/iface/<iface_name>".
+ * "/var/lib/iscsi/iface/<iface_name>".
* To generate iSCSI interface configuration when new card installed, please
* use iscsi_default_iface_setup().
* Illegal configuration file will be treated as error LIBISCSI_ERR_IDBM.
@@ -438,7 +438,7 @@ __DLL_EXPORT void iscsi_ifaces_free(struct iscsi_iface **ifaces,
* If this pointer is NULL, your program will be terminated by assert.
* @iface_name:
* String. Name of iSCSI interface. Also the file name of configuration
- * file "/etc/iscsi/iface/<iface_name>".
+ * file "/var/lib/iscsi/iface/<iface_name>".
* If this pointer is NULL or empty string, your program will be terminated
* by assert.
* @iface:
diff --git a/libopeniscsiusr/libopeniscsiusr/libopeniscsiusr_iface.h b/libopeniscsiusr/libopeniscsiusr/libopeniscsiusr_iface.h
index a1a2552..95b0160 100644
--- a/libopeniscsiusr/libopeniscsiusr/libopeniscsiusr_iface.h
+++ b/libopeniscsiusr/libopeniscsiusr/libopeniscsiusr_iface.h
@@ -182,7 +182,7 @@ __DLL_EXPORT const char *iscsi_iface_name_get(struct iscsi_iface *iface);
*
* Dump all configurations of specified iSCSI interface. Will skip empty
* configuration so that output string could be saved directly to
- * /etc/iscsi/ifaces/<iface_name> file.
+ * /var/lib/iscsi/ifaces/<iface_name> file.
*
* @iface:
* Pointer of 'struct iscsi_iface'.
diff --git a/libopeniscsiusr/node.h b/libopeniscsiusr/node.h
index 39e07b3..9eba7fa 100644
--- a/libopeniscsiusr/node.h
+++ b/libopeniscsiusr/node.h
@@ -44,7 +44,7 @@ struct iscsi_node {
char portal[NI_MAXHOST * 2];
};
-#define NODE_CONFIG_DIR ISCSI_CONFIG_ROOT"nodes"
+#define NODE_CONFIG_DIR ISCSI_VAR_LIB"nodes"
/* Might be public in the future */
__DLL_LOCAL void iscsi_node_free(struct iscsi_node *node);
--
2.26.2