diff --git a/scripts/specialize-patch b/scripts/specialize-patch index 1f560ef55..cd9467b5b 100755 --- a/scripts/specialize-patch +++ b/scripts/specialize-patch @@ -105,6 +105,12 @@ function evaluate(stmnt) { gsub("defined *\\( *SCST_IO_CONTEXT *\\)", SCST_IO_CONTEXT, stmnt) } + if (generating_upstream_patch_defined) + { + gsub("defined *GENERATING_UPSTREAM_PATCH", 1, stmnt) + gsub("defined *\\( *GENERATING_UPSTREAM_PATCH *\\)", 1, stmnt) + } + do { last_stmnt = stmnt @@ -192,6 +198,7 @@ function handle_if() || $0 ~ "RHEL_MAJOR" \ || $0 ~ "RHEL_MINOR" \ || $0 ~ "RHEL_RELEASE_CODE" \ + || $0 ~ "GENERATING_UPSTREAM_PATCH" \ || $0 ~ "SCSI_EXEC_REQ_FIFO_DEFINED" \ || $0 ~ "SCST_IO_CONTEXT") { @@ -325,6 +332,8 @@ BEGIN { } if (delete_disabled_code != 0 && delete_disabled_code != 1) delete_disabled_code = 0 + if (generating_upstream_patch_defined != 0 && generating_upstream_patch_defined != 1) + generating_upstream_patch_defined = 0 # Variable initialization. reset_hunk_state_variables()