From c7c55d03ac02d88f4942bc0e675d5e78317f0186 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 8 Apr 2020 14:50:30 +0000 Subject: [PATCH] scripts: Merge r7819:8857 from trunk git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.4.x@8858 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scripts/checkpatch | 4 +++- scripts/generate-kernel-patch | 4 ++-- scripts/kernel-functions | 2 +- scripts/specialize-patch | 2 +- scripts/update-version | 6 +++--- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/scripts/checkpatch b/scripts/checkpatch index bddb1b765..4a388b5e3 100755 --- a/scripts/checkpatch +++ b/scripts/checkpatch @@ -3,9 +3,11 @@ ignore=( CONSTANT_COMPARISON LINUX_VERSION_CODE + LONG_LINE + LONG_LINE_COMMENT LONG_LINE_STRING RETURN_VOID SPDX_LICENSE_TAG SYMBOLIC_PERMS ) -../linux-kernel/scripts/checkpatch.pl -f --show-types --ignore="$(echo "${ignore[@]}" | sed 's/ /,/g')" $(list-source-files | grep -vE 'fcst/linux-patches|patch$|pdf$|png$|^ibmvstgt/|^mpt/|^qla_isp/|^mvsas_tgt/') | sed 's/^#[0-9]*: FILE: \(.*\):/\1:1:/' +../linux-kernel/scripts/checkpatch.pl -f --show-types --ignore="$(echo "${ignore[@]}" | sed 's/ /,/g')" $(list-source-files | grep -vE 'fcst/linux-patches|patch$|pdf$|png$|^ibmvstgt/|^iscsi-scst/usr|^mpt/|^qla_isp/|^mvsas_tgt/') | sed 's/^#[0-9]*: FILE: \(.*\):/\1:1:/' diff --git a/scripts/generate-kernel-patch b/scripts/generate-kernel-patch index 5d8a61a03..9391f413e 100755 --- a/scripts/generate-kernel-patch +++ b/scripts/generate-kernel-patch @@ -114,7 +114,6 @@ function specialize_patch { "$(dirname "$0")/specialize-patch" \ "${specialize_patch_options[@]}" \ -v kernel_version="${kver3}" \ - -v SCSI_EXEC_REQ_FIFO_DEFINED="${scsi_exec_req_fifo_defined}" \ -v SCST_IO_CONTEXT="${scst_io_context}" else cat @@ -289,7 +288,8 @@ scst/include/scst_event.h scst/include/backport.h" scst_04_main="scst/src/scst_main.c scst/src/scst_module.c scst/src/scst_priv.h \ scst/src/scst_copy_mgr.c scst/src/scst_dlm.c scst/src/scst_dlm.h \ scst/src/scst_event.c scst/src/scst_no_dlm.c" -scst_05_targ="scst/src/scst_targ.c" +scst_05_targ="scst/src/scst_targ.c scst/src/scst_local_cmd.c \ +scst/src/scst_local_cmd.h" scst_06_lib="scst/src/scst_lib.c" scst_07_pres="scst/src/scst_pres.h scst/src/scst_pres.c" scst_08_sysfs="scst/src/scst_sysfs.c" diff --git a/scripts/kernel-functions b/scripts/kernel-functions index 1b2ff8cff..87f75119e 100644 --- a/scripts/kernel-functions +++ b/scripts/kernel-functions @@ -332,7 +332,7 @@ index d6d65537b0d9..6aad8308a0ac 100644 EOF fi case "$1" in - 2.6.3[6-9]*|3.[0-9]|3.[0-9].*|3.1[01345]|3.1[01345].*|3.17|3.17.*|3.19|3.19.*|4.[023567]|4.[023567].*) + 2.6.3[6-9]*|3.[0-9]|3.[0-9].*|3.1[01345]|3.1[01345].*|3.1[789]|3.1[789].*|4.[023567]|4.[023567].*) patch -p1 <<'EOF' From c6a385539175ebc603da53aafb7753d39089f32e Mon Sep 17 00:00:00 2001 From: Borislav Petkov diff --git a/scripts/specialize-patch b/scripts/specialize-patch index e75c60c46..40563a6fa 100755 --- a/scripts/specialize-patch +++ b/scripts/specialize-patch @@ -148,7 +148,7 @@ function evaluate(stmnt, pattern, arg, op, result) { gsub("defined\\(HAVE_IB_DMA_MAP_OPS\\)", "(LINUX_VERSION_CODE >= KERNEL_VERSION(0, 0, 0))", stmnt) - gsub("defined\\(HAVE_IB_SG_DMA_LEN\\)", + gsub("HAVE_IB_SG_DMA_LEN", "(LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0))", stmnt) gsub("defined(ENABLE_NPIV)", 0, stmnt) diff --git a/scripts/update-version b/scripts/update-version index ab2310ccc..ff57e280b 100755 --- a/scripts/update-version +++ b/scripts/update-version @@ -17,11 +17,11 @@ suffix=$4 fv=$major.$minor.$release$suffix reldate=$(date "+%d %B %Y") -sed -i "s,^\(#define[[:blank:]]*\(FT_VERSION\|ISCSI_VERSION_STRING\|Q2T_VERSION_STRING\|SCST_LOCAL_VERSION\|SCST_VERSION_NAME\|DRV_VERSION\|VERSION_STR\)[[:blank:]]*\)\"[^\"]*\",\1\"$major.$minor.$release$suffix\"," scst_local/scst_local.c srpt/src/ib_srpt.c fcst/fcst.h iscsi-scst/include/iscsi_scst_ver.h qla2x00t/qla2x00-target/qla2x00t.h scst/include/scst_const.h usr/include/version.h +sed -i "s,^\(#define[[:blank:]]*\(FT_VERSION\|ISCSI_VERSION_STRING\|Q2T_VERSION_STRING\|SCST_LOCAL_VERSION\|SCST_VERSION_NAME\|DRV_VERSION\|VERSION_STR\)[[:blank:]]*\)\"[^\"]*\",\1\"$major.$minor.$release$suffix\"," iscsi-scst/kernel/isert-scst/isert.c scst_local/scst_local.c srpt/src/ib_srpt.c fcst/fcst.h iscsi-scst/include/iscsi_scst_ver.h qla2x00t/qla2x00-target/qla2x00t.h scst/include/scst_const.h usr/include/version.h sed -i "s,^\(Version[[:blank:]]*\)[^[:blank:]]*\(\),\1$fv\2," doc/scst_user_spec.sgml sed -i "s/^Version .*/Version $fv, $reldate/" iscsi-scst/README qla2x00t/qla2x00-target/README scst/README usr/fileio/README -sed -i "s/^\(\(static const char \*scst_local_version_date\|#define[[:blank:]]*DRV_RELDATE\)[[:blank:]]*\)\"[^\"]*\"/\1\"$reldate\"/" scst_local/scst_local.c srpt/src/ib_srpt.c +sed -i "s/^\(\(static const char \*scst_local_version_date\|#define[[:blank:]]*DRV_RELDATE\)[[:blank:]]*\)\"[^\"]*\"/\1\"$reldate\"/" iscsi-scst/kernel/isert-scst/isert.c scst_local/scst_local.c srpt/src/ib_srpt.c sed -i "s/^\(#define[[:blank:]]*[^[:blank:]]*_REV[[:blank:]]*\)\"[[:blank:]0-9]*\"/\1\"$(printf "%-4s" ${major}${minor}${release})\"/" usr/fileio/common.h scst/src/dev_handlers/scst_vdisk.c sed -i "s/^\(#define[[:blank:]]*SCST_VERSION_CODE[[:blank:]]*\).*/\1SCST_VERSION($major, $minor, $release, 0)/" scst/include/scst.h sed -i "s/^\(#define[[:blank:]]*Q2T_VERSION_CODE[[:blank:]]*\).*/\1Q2T_VERSION($major, $minor, $release, 0)/" qla2x00t/qla2x00-target/qla2x00t.h -sed -i "s/^\(.Version[[:blank:]]*=[[:blank:]]*'SCST Configurator v\)[0-9.]*/\1$fv/" scstadmin/scstadmin.sysfs/scstadmin +sed -i "s/^\(my .Version[[:blank:]]*=[[:blank:]]*'SCST Configurator v\)[^']*/\1$fv/" scstadmin/scstadmin.sysfs/scstadmin