When command-line option -u is passed to scripts/generate-kernel-patch,
authorbvassche <bvassche@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Thu, 22 Oct 2009 18:26:19 +0000 (18:26 +0000)
committerbvassche <bvassche@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Thu, 22 Oct 2009 18:26:19 +0000 (18:26 +0000)
undefine the preprocessor symbol
CONFIG_TCP_ZERO_COPY_TRANSFER_COMPLETION_NOTIFICATION.

git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@1249 d57e44dd-8a1f-0410-8b47-8ef2f437770f

scripts/generate-kernel-patch
scripts/specialize-patch

index e61cde5..e6c777d 100755 (executable)
@@ -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
index 2b878fc..f2eb4e2 100755 (executable)
@@ -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()