From 4293d9c641a62644f00d5787ea2c8030107b9eb0 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Mon, 20 Apr 2009 20:36:48 +0000 Subject: [PATCH] Merge of r790: Patches from Bart Van Assche : - Fix for trailing whitespaces - Fix for an error in the iSCSI-SCST howto document. - Make SCST compile on RHEL 5.3 + small qla2x00t README update git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/1.0.1.x@791 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/doc/iscsi-scst-howto.txt | 2 +- qla2x00t/qla2x00-target/README | 4 ++++ scst/src/scst_proc.c | 15 ++++++++++++++- scst/src/scst_targ.c | 2 +- 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/iscsi-scst/doc/iscsi-scst-howto.txt b/iscsi-scst/doc/iscsi-scst-howto.txt index dff140f1a..88a8aa20d 100644 --- a/iscsi-scst/doc/iscsi-scst-howto.txt +++ b/iscsi-scst/doc/iscsi-scst-howto.txt @@ -81,7 +81,7 @@ Replace the device names by names that apply to your system: scstadmin -adddev disk01 -path /dev/ram0 -handler vdisk -options NV_CACHE scstadmin -adddev disk02 -path /dev/ram1 -handler vdisk -options NV_CACHE scstadmin -assigndev disk01 -group Default -lun 0 - scstadmin -assigndev disk02 -group Default -lun 0 + scstadmin -assigndev disk02 -group Default -lun 1 scstadmin -WriteConfig /etc/scst.conf cat /etc/scst.conf diff --git a/qla2x00t/qla2x00-target/README b/qla2x00t/qla2x00-target/README index 6bd1ad14d..18c159ad0 100644 --- a/qla2x00t/qla2x00-target/README +++ b/qla2x00t/qla2x00-target/README @@ -81,6 +81,10 @@ Then you should configure exported devices using the corresponding interface of SCST core. It is highly recommended to use scstadmin utility for that purpose. +You can find some installation and configuration HOWTOs in +http://scst.sourceforge.net/qla2x00t-howto.html and +https://forums.openfiler.com/viewtopic.php?id=3422. + Compilation options ------------------- diff --git a/scst/src/scst_proc.c b/scst/src/scst_proc.c index ed6c2c171..5ec135887 100644 --- a/scst/src/scst_proc.c +++ b/scst/src/scst_proc.c @@ -176,7 +176,20 @@ static DEFINE_MUTEX(scst_proc_mutex); #include -#if !defined(CONFIG_PPC) && (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)) +#if !defined(CONFIG_PPC) && (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)) && \ + (!defined(RHEL_RELEASE_CODE) || RHEL_RELEASE_CODE -0 < 5 * 256 + 3) +/* + * If strcasecmp() and strncasecmp() have already been declared in + * , do not redefine these functions. Declarations for these + * functions are present in the header of the following + * kernels: + * - The kernel headers on PPC for all kernel versions supported by SCST. + * - Kernel version 2.6.22 and later for all architectures. + * - RHEL 5.3 and later. + * + * We can't use RHEL_RELEASE_CODE(5, 3), because it triggers an error on + * non-RHEL/CentOS systems, because it expands to "< (5,3)" + */ #if defined(CONFIG_SCST_DEBUG) || defined(CONFIG_SCST_TRACING) static int strcasecmp(const char *s1, const char *s2) diff --git a/scst/src/scst_targ.c b/scst/src/scst_targ.c index ddd6e6999..6ea220200 100644 --- a/scst/src/scst_targ.c +++ b/scst/src/scst_targ.c @@ -287,7 +287,7 @@ void scst_cmd_init_done(struct scst_cmd *cmd, goto active; } - /* + /* * Cmd must be inited here to preserve the order. In case if cmd * already preliminary completed by target driver we need to init * cmd anyway to find out in which format we should return sense.