diff options
author | Michael Forney <mforney@mforney.org> | 2019-06-17 22:33:06 -0700 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2019-06-25 10:17:07 +0200 |
commit | ebf8d82bbb32720878a3867b28e655950ccee992 (patch) | |
tree | c9c99ac58cb352cff16a040e46cb165b8465e589 | |
parent | 886532aee3cd42d95196601ed16d7c3d4679e9e5 (diff) | |
download | blackbird-op-linux-ebf8d82bbb32720878a3867b28e655950ccee992.tar.gz blackbird-op-linux-ebf8d82bbb32720878a3867b28e655950ccee992.zip |
locking/atomics: Use sed(1) instead of non-standard head(1) option
POSIX says the -n option must be a positive decimal integer. Not all
implementations of head(1) support negative numbers meaning offset from
the end of the file.
Instead, the sed expression '$d' has the same effect of removing the
last line of the file.
Signed-off-by: Michael Forney <mforney@mforney.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20190618053306.730-1-mforney@mforney.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rwxr-xr-x | scripts/atomic/check-atomics.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/atomic/check-atomics.sh b/scripts/atomic/check-atomics.sh index cfa0c2f71c84..8378c63a1e09 100755 --- a/scripts/atomic/check-atomics.sh +++ b/scripts/atomic/check-atomics.sh @@ -22,7 +22,7 @@ while read header; do OLDSUM="$(tail -n 1 ${LINUXDIR}/include/${header})" OLDSUM="${OLDSUM#// }" - NEWSUM="$(head -n -1 ${LINUXDIR}/include/${header} | sha1sum)" + NEWSUM="$(sed '$d' ${LINUXDIR}/include/${header} | sha1sum)" NEWSUM="${NEWSUM%% *}" if [ "${OLDSUM}" != "${NEWSUM}" ]; then |