Bug fix: substitute CONFIG_SCST_PROC properly.

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2103 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2010-09-12 07:49:54 +00:00
parent 9878d2533f
commit 2aa9e1d69a
2 changed files with 24 additions and 26 deletions
+21 -21
View File
@@ -180,16 +180,31 @@ do
esac
done
if [ $# != 1 ]; then
usage
exit 1
fi
# Strip patch level from the kernel version number.
if [ "${1#[0-9]*.[0-9]*.[0-9]*.[0-9]*}" != "$1" ]; then
kernel_version="${1%.[0-9]*}"
patch_level="${1#${kernel_version}.}"
else
kernel_version="$1"
fi
# Make sure that for kernel 2.6.33 and later the line
# "#define CONFIG_SCST_PROC" is removed from scst/include/scst.h.
if grep -qw scst_sysfs scst/kernel/in-tree/Makefile.scst-${kernel_version} \
|| [ "${generating_upstream_patch}" = "true" ];
then
specialize_patch_options="${specialize_patch_options} -v config_scst_proc_undefined=1"
fi
if [ "${debug_specialize}" = "true" ]; then
specialize_patch_options="${specialize_patch_options} -v debug=1"
fi
if [ "${generating_upstream_patch}" = "true" ]; then
specialize_patch_options="${specialize_patch_options} -v generating_upstream_patch_defined=1 -v config_tcp_zero_copy_transfer_completion_notification_undefined=1 -v config_scst_proc_undefined=1"
fi
if [ $# != 1 ]; then
usage
exit 1
specialize_patch_options="${specialize_patch_options} -v generating_upstream_patch_defined=1 -v config_tcp_zero_copy_transfer_completion_notification_undefined=1"
fi
if [ "${multiple_patches}" = "" ]; then
@@ -206,14 +221,6 @@ fi
# Patch Generation #
####################
# Strip patch level from the kernel version number.
if [ "${1#[0-9]*.[0-9]*.[0-9]*.[0-9]*}" != "$1" ]; then
kernel_version="${1%.[0-9]*}"
patch_level="${1#${kernel_version}.}"
else
kernel_version="$1"
fi
for f in fcst/linux-patches/series-${kernel_version}*
do
if [ -e "$f" ]; then
@@ -221,13 +228,6 @@ do
fi
done
# Make sure that for kernel 2.6.33 and later the line
# "#define CONFIG_SCST_PROC" is removed from scst/include/scst.h.
if grep -qw scst_sysfs scst/kernel/in-tree/Makefile.scst-${kernel_version};
then
specialize_patch_options="${specialize_patch_options} -v config_scst_proc_undefined=1"
fi
if [ "${multiple_patches}" = "false" ]; then
echo "Signed-off-by: ${SIGNED_OFF_BY}"
echo ""
+3 -5
View File
@@ -129,11 +129,9 @@ function evaluate(stmnt) {
gsub("defined *\\( *CONFIG_TCP_ZERO_COPY_TRANSFER_COMPLETION_NOTIFICATION *\\)", 0, stmnt)
}
if (config_scst_proc_undefined)
{
gsub("defined *CONFIG_SCST_PROC", 0, stmnt)
gsub("defined *\\( *CONFIG_SCST_PROC *\\)", 0, stmnt)
}
gsub("defined *CONFIG_SCST_PROC", !config_scst_proc_undefined, stmnt)
gsub("defined *\\( *CONFIG_SCST_PROC *\\)", !config_scst_proc_undefined,
stmnt)
if (debug)
printf "/* debug specialize-patch: (b) %s */\n", stmnt