scst: Do not build cluster PR support if CONFIG_SCST_NO_DLM has been set

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6700 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2015-11-18 22:44:29 +00:00
parent 87347442fd
commit 032f4fd733
3 changed files with 8 additions and 4 deletions

View File

@@ -155,7 +155,8 @@ INSTALL_DIR_H := $(DESTDIR)$(PREFIX)/include/scst
enable-Wextra = $(shell uname_r="$$(uname -r)"; if [ "$${uname_r%.el5}" = "$${uname_r}" ]; then echo "$(1)"; fi)
EXTRA_CFLAGS += -I$(SCST_INC_DIR) $(call enable-Wextra,-Wextra \
-Wno-unused-parameter -Wno-missing-field-initializers)
-Wno-unused-parameter -Wno-missing-field-initializers) \
$(shell [ -n "${CONFIG_SCST_NO_DLM}" ] && echo -DCONFIG_SCST_NO_DLM)
#EXTRA_CFLAGS += -DCONFIG_SCST_STRICT_SERIALIZING

View File

@@ -30,7 +30,8 @@
#include "scst_pres.h"
#include "scst_dlm.h"
#if defined(CONFIG_DLM) || defined(CONFIG_DLM_MODULE)
#if (defined(CONFIG_DLM) || defined(CONFIG_DLM_MODULE)) && \
!defined(CONFIG_SCST_NO_DLM)
static void scst_pr_dlm_cleanup(struct scst_device *dev);
static void scst_dlm_pre_bast(void *bastarg, int mode);

View File

@@ -1173,10 +1173,12 @@ void scst_pr_cleanup(struct scst_device *dev)
int scst_pr_set_cluster_mode(struct scst_device *dev, bool cluster_mode,
const char *cl_dev_id)
{
bool cluster_mode_enabled = false;
int res = 0;
#if defined(CONFIG_DLM) || defined(CONFIG_DLM_MODULE)
#if defined(CONFIG_DLM) || defined(CONFIG_DLM_MODULE) && \
!defined(CONFIG_SCST_NO_DLM)
bool cluster_mode_enabled = false;
cluster_mode_enabled = dev->cl_ops == &scst_dlm_cl_ops;
if (cluster_mode_enabled == cluster_mode)