[iscsi-initiator-utils: 32/109] commit cleanup: forgot to edit sources and cvs add patch

Chris Leech cleech at fedoraproject.org
Tue Dec 10 21:22:03 UTC 2013


commit 220fdb50c8c7238d1b7fcc1d0e20494148eecda5
Author: mchristi <mchristi at redhat.com>
Date:   Tue Mar 20 19:52:42 2007 +0000

    commit cleanup: forgot to edit sources and cvs add patch

 iscsi-initiator-utils-use-var-for-config.patch |   78 ++++
 open-iscsi-5.0.5.595-add-iscsi-iname.patch     |  470 ------------------------
 sources                                        |    2 +-
 3 files changed, 79 insertions(+), 471 deletions(-)
---
diff --git a/iscsi-initiator-utils-use-var-for-config.patch b/iscsi-initiator-utils-use-var-for-config.patch
new file mode 100644
index 0000000..9b739d4
--- /dev/null
+++ b/iscsi-initiator-utils-use-var-for-config.patch
@@ -0,0 +1,78 @@
+diff -aurp open-iscsi-6.2.0.695/usr/idbm.c open-iscsi-6.2.0.695.work/usr/idbm.c
+--- open-iscsi-6.2.0.695/usr/idbm.c	2006-10-03 13:54:51.000000000 -0500
++++ open-iscsi-6.2.0.695.work/usr/idbm.c	2006-10-03 14:44:56.000000000 -0500
+@@ -831,10 +831,18 @@ idbm_node_write(idbm_t *db, node_rec_t *
+ 
+ 	idbm_lock(db);
+ 
+-	snprintf(portal, PATH_MAX, "%s", NODE_CONFIG_DIR);
+-	if (access(portal, F_OK) != 0) {
++	/* bah: there has to be a function to make all these subdirs for us */
++	if (access(CONFIG_DIR, F_OK) != 0) {
+ 		if (mkdir(portal, 0660) != 0) {
+-			log_error("Could not make %s\n", portal);
++			log_error("Could not make %s %d\n", CONFIG_DIR, errno);
++			rc = errno;
++			goto free_portal;
++		}
++	}
++
++	if (access(NODE_CONFIG_DIR, F_OK) != 0) {
++		if (mkdir(NODE_CONFIG_DIR, 0660) != 0) {
++			log_error("Could not make %s\n", NODE_CONFIG_DIR);
+ 			rc = errno;
+ 			goto free_portal;
+ 		}
+@@ -869,6 +877,7 @@ free_portal:
+ 	return rc;
+ }
+ 
++/* TODO: merged these two functions */
+ static int
+ idbm_discovery_write(idbm_t *db, discovery_rec_t *rec)
+ {
+@@ -883,10 +892,18 @@ idbm_discovery_write(idbm_t *db, discove
+ 	}
+ 
+ 	idbm_lock(db);
+-	snprintf(portal, PATH_MAX, "%s", ST_CONFIG_DIR);
+-	if (access(portal, F_OK) != 0) {
+-		if (mkdir(portal, 0660) != 0) {
+-			log_error("Could not make %s\n", portal);
++
++	if (access(CONFIG_DIR, F_OK) != 0) {
++		if (mkdir(CONFIG_DIR, 0660) != 0) {
++			log_error("Could not make %s %d\n", CONFIG_DIR, errno);
++			rc = errno;
++			goto free_portal;
++		}
++	}
++
++	if (access(ST_CONFIG_DIR, F_OK) != 0) {
++		if (mkdir(ST_CONFIG_DIR, 0660) != 0) {
++			log_error("Could not make %s\n", ST_CONFIG_DIR);
+ 			rc = errno;
+ 			goto free_portal;
+ 		}
+diff -aurp open-iscsi-6.2.0.695/usr/initiator.h open-iscsi-6.2.0.695.work/usr/initiator.h
+--- open-iscsi-6.2.0.695/usr/initiator.h	2006-10-03 13:54:51.000000000 -0500
++++ open-iscsi-6.2.0.695.work/usr/initiator.h	2006-10-03 14:08:09.000000000 -0500
+@@ -31,11 +31,15 @@
+ #include "actor.h"
+ #include "queue.h"
+ 
+-#define ST_CONFIG_DIR		"/etc/iscsi/send_targets"
+-#define NODE_CONFIG_DIR		"/etc/iscsi/nodes"
++#define CONFIG_DIR		"/var/lib/iscsi"
++#define ST_CONFIG_DIR		"/var/lib/iscsi/send_targets"
++#define NODE_CONFIG_DIR		"/var/lib/iscsi/nodes"
++
+ #define CONFIG_FILE		"/etc/iscsi/iscsid.conf"
+-#define PID_FILE		"/var/run/iscsid.pid"
+ #define INITIATOR_NAME_FILE	"/etc/iscsi/initiatorname.iscsi"
++
++#define PID_FILE		"/var/run/iscsid.pid"
++
+ #define LOCK_DIR		"/var/lock/iscsi"
+ #define LOCK_FILE		"/var/lock/iscsi/lock"
+ #define LOCK_WRITE_FILE		"/var/lock/iscsi/lock.write"
diff --git a/sources b/sources
index 4b5f795..1055d7d 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-01b98ae5349609977c795cc039cd33d3  open-iscsi-6.2.0.695.tar.bz2
+2e7ce941ea4e4eda7c82f0b272a33bf9  open-iscsi-2.0-754.tar.gz


More information about the scm-commits mailing list