diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2009-11-03 21:14:39 +0100 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-11-03 21:14:39 +0100 |
commit | 2058297d2d045cb57138c33b87cfabcc80e65186 (patch) | |
tree | 7ccffd0e162cbd7471f643561e79f23abb989a62 /drivers/md/unroll.awk | |
parent | 150e6c67f4bf6ab51e62defc41bd19a2eefe5709 (diff) | |
parent | 4b27e1bb442e964903f8a3fa6bdf33a602dc0941 (diff) | |
download | kernel-crypto-2058297d2d045cb57138c33b87cfabcc80e65186.tar.gz kernel-crypto-2058297d2d045cb57138c33b87cfabcc80e65186.tar.xz kernel-crypto-2058297d2d045cb57138c33b87cfabcc80e65186.zip |
Merge branch 'for-linus' into for-2.6.33
Conflicts:
block/cfq-iosched.c
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/md/unroll.awk')
-rw-r--r-- | drivers/md/unroll.awk | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/md/unroll.awk b/drivers/md/unroll.awk new file mode 100644 index 00000000000..c6aa03631df --- /dev/null +++ b/drivers/md/unroll.awk @@ -0,0 +1,20 @@ + +# 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 + } +} |