mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-16 23:45:31 +08:00
0058d07ec6
Set the x bit to some scripts to make them directly executable.
Especially, scripts/checkdeclares.pl is not hooked by anyone.
It should be executable since it is tedious to type
'perl scripts/checkdeclares.pl'.
The original patch [1] set the x bit properly, but it was lost when
it was merged as commit 21917bded7
("scripts: a new script for
checking duplicate struct declaration").
[1] https://lore.kernel.org/lkml/20210401110943.1010796-1-wanjiabing@vivo.com/
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
10 lines
305 B
Bash
Executable File
10 lines
305 B
Bash
Executable File
#!/bin/sh
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
if [ ! -f "$1" ]; then
|
|
SEED=`od -A n -t x8 -N 32 /dev/urandom | tr -d ' \n'`
|
|
echo "const char *randstruct_seed = \"$SEED\";" > "$1"
|
|
HASH=`echo -n "$SEED" | sha256sum | cut -d" " -f1 | tr -d ' \n'`
|
|
echo "#define RANDSTRUCT_HASHED_SEED \"$HASH\"" > "$2"
|
|
fi
|