mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-05 10:04:12 +08:00
702600eef7
Newer versions of awk spit out these fun warnings:
awk: ../lib/raid6/unroll.awk:16: warning: regexp escape sequence `\#' is not a known regexp operator
As commit 700c1018b8
("x86/insn: Fix awk regexp warnings") showed, it
turns out that there are a number of awk strings that do not need to be
escaped and newer versions of awk now warn about this.
Fix the string up so that no warning is produced. The exact same kernel
module gets created before and after this patch, showing that it wasn't
needed.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20191206152600.GA75093@kroah.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 lines
423 B
Awk
21 lines
423 B
Awk
|
|
# This filter requires one command line option of form -vN=n
|
|
# where n must be a decimal number.
|
|
#
|
|
# Repeat each input line containing $$ n times, replacing $$ with 0...n-1.
|
|
# Replace each $# with n, and each $* with a single $.
|
|
|
|
BEGIN {
|
|
n = N + 0
|
|
}
|
|
{
|
|
if (/\$\$/) { rep = n } else { rep = 1 }
|
|
for (i = 0; i < rep; ++i) {
|
|
tmp = $0
|
|
gsub(/\$\$/, i, tmp)
|
|
gsub(/\$#/, n, tmp)
|
|
gsub(/\$\*/, "$", tmp)
|
|
print tmp
|
|
}
|
|
}
|