From 64803db9f18103483c25b62c5a25b605f12367cf Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 22 Oct 2009 18:26:19 +0000 Subject: [PATCH] When command-line option -u is passed to scripts/generate-kernel-patch, undefine the preprocessor symbol CONFIG_TCP_ZERO_COPY_TRANSFER_COMPLETION_NOTIFICATION. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1249 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scripts/generate-kernel-patch | 2 +- scripts/specialize-patch | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/generate-kernel-patch b/scripts/generate-kernel-patch index e61cde505..e6c777d8a 100755 --- a/scripts/generate-kernel-patch +++ b/scripts/generate-kernel-patch @@ -175,7 +175,7 @@ do done if [ "${generating_upstream_patch}" = "true" ]; then - specialize_patch_options="${specialize_patch_options} -v generating_upstream_patch_defined=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 [ $# != 1 ]; then diff --git a/scripts/specialize-patch b/scripts/specialize-patch index 2b878fc4f..f2eb4e24f 100755 --- a/scripts/specialize-patch +++ b/scripts/specialize-patch @@ -111,6 +111,12 @@ function evaluate(stmnt) { gsub("defined *\\( *GENERATING_UPSTREAM_PATCH *\\)", 1, stmnt) } + if (config_tcp_zero_copy_transfer_completion_notification_undefined) + { + gsub("defined *CONFIG_TCP_ZERO_COPY_TRANSFER_COMPLETION_NOTIFICATION", 0, stmnt) + gsub("defined *\\( *CONFIG_TCP_ZERO_COPY_TRANSFER_COMPLETION_NOTIFICATION *\\)", 0, stmnt) + } + do { last_stmnt = stmnt @@ -199,6 +205,7 @@ function handle_if() || $0 ~ "RHEL_MINOR" \ || $0 ~ "RHEL_RELEASE_CODE" \ || $0 ~ "GENERATING_UPSTREAM_PATCH" \ + || $0 ~ "CONFIG_TCP_ZERO_COPY_TRANSFER_COMPLETION_NOTIFICATION" \ || $0 ~ "SCSI_EXEC_REQ_FIFO_DEFINED" \ || $0 ~ "SCST_IO_CONTEXT") { @@ -335,6 +342,8 @@ BEGIN { delete_disabled_code = 0 if (generating_upstream_patch_defined != 0 && generating_upstream_patch_defined != 1) generating_upstream_patch_defined = 0 + if (config_tcp_zero_copy_transfer_completion_notification_undefined != 0 && config_tcp_zero_copy_transfer_completion_notification_undefined != 1) + config_tcp_zero_copy_transfer_completion_notification_undefined = 0 # Variable initialization. reset_hunk_state_variables()