Fix for user space part of the iSCSI target, which refused connections in the procfs mode.

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1326 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2009-11-06 19:28:27 +00:00
parent b5ea323927
commit eaed144f79
3 changed files with 19 additions and 1 deletions
+7
View File
@@ -15,6 +15,7 @@ SBINDIR := /usr/local/sbin
INITDIR := /etc/init.d
RCDIR := /etc/rc.d
KMOD := $(shell pwd)/kernel
INCDIR := $(shell pwd)/include
ifeq ($(KVER),)
ifeq ($(KDIR),)
@@ -120,7 +121,13 @@ perf2debug:
rm $(KMOD)/Makefile.aa
disable_proc:
sed -i.aa s/"^#define CONFIG_SCST_PROC"/"\/* #define CONFIG_SCST_PROC *\/"/ $(INCDIR)/iscsi_scst_ver.h
@cmp $(INCDIR)/iscsi_scst_ver.h $(INCDIR)/iscsi_scst_ver.h.aa >/dev/null; if [[ $$? = 0 ]]; then rm $(INCDIR)/iscsi_scst_ver.h.aa; echo "sed failed"; false; fi
rm $(INCDIR)/iscsi_scst_ver.h.aa
enable_proc:
sed -i.aa s/"\/\* #define CONFIG_SCST_PROC \*\/"/"#define CONFIG_SCST_PROC"/ $(INCDIR)/iscsi_scst_ver.h
@cmp $(INCDIR)/iscsi_scst_ver.h $(INCDIR)/iscsi_scst_ver.h.aa >/dev/null; if [[ $$? = 0 ]]; then rm $(INCDIR)/iscsi_scst_ver.h.aa; echo "sed failed"; false; fi
rm $(INCDIR)/iscsi_scst_ver.h.aa
.PHONY: all mods progs install clean extraclean debug2release release2debug debug2perf perf2debug disable_proc enable_proc
+9 -1
View File
@@ -13,4 +13,12 @@
* GNU General Public License for more details.
*/
#define ISCSI_VERSION_STRING "1.0.2/0.4.17r214"
#define CONFIG_SCST_PROC
#ifdef CONFIG_SCST_PROC
#define ISCSI_VERSION_STRING_SUFFIX "-procfs"
#else
#define ISCSI_VERSION_STRING_SUFFIX
#endif
#define ISCSI_VERSION_STRING "1.0.2/0.4.17r214" ISCSI_VERSION_STRING_SUFFIX
+3
View File
@@ -155,6 +155,9 @@ int target_add(u32 *tid, char *name)
INIT_LIST_HEAD(&target->sessions_list);
INIT_LIST_HEAD(&target->isns_head);
target->tid = *tid;
#ifdef CONFIG_SCST_PROC
target->tgt_enabled = 1;
#endif
insque(&target->tlist, &targets_list);
isns_target_register(name);