From 8eb92a65826ed93c14e50778ca8bb22b4b264c85 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Fri, 16 May 2008 10:29:34 +0000 Subject: [PATCH] Patch from Bart Van Assche : I don't know when this was broken, but with the current SVN version, after having generated and applied a kernel patch for SCST, iscsi-scst doesn't build anymore. The patch below fixes this and also includes a cleanup patch for the generate-kernel-patch'>generate-kernel-patch script. The generated kernel patch has been tested with the 2.6.24 and 2.6.25.4 kernels (extracted kernel sources + applied patch + built kernel + installed kernel + reboot + load SCST modules). Signed-off-by: git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@375 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scripts/generate-kernel-patch | 105 ++++++++++++++---------------- scst/kernel/in-tree/Makefile.scst | 2 +- 2 files changed, 50 insertions(+), 57 deletions(-) diff --git a/scripts/generate-kernel-patch b/scripts/generate-kernel-patch index 5ecc1a048..21a92280e 100755 --- a/scripts/generate-kernel-patch +++ b/scripts/generate-kernel-patch @@ -32,7 +32,9 @@ function add_patch { exit 1 fi - sed -e "s:^--- [^ ]*:--- orig/$2:" -e "s:^+++ [^ ]*:+++ $2:" < "$1" + sed -e "s:^--- [^ ]*:--- orig/linux-${kernel_version}/$2:" \ + -e "s:^+++ [^ ]*:+++ linux-${kernel_version}/$2:" \ + < "$1" } # Generate a patch for a file to be added to the kernel source tree, and strip @@ -48,21 +50,20 @@ function add_file { exit 1 fi - # Skip any files generated by the kernel build process (*.mod.c). - if [ "${1%.mod.c}" != "$1" ]; then - return 0; - fi - - cat <