linux-stable/scripts/xen-hypercalls.sh
Masahiro Yamada 0058d07ec6 scripts: make some scripts executable
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>
2021-08-10 09:13:25 +09:00

13 lines
386 B
Bash
Executable file

#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
out="$1"
shift
in="$@"
for i in $in; do
eval $CPP $LINUXINCLUDE -dD -imacros "$i" -x c /dev/null
done | \
awk '$1 == "#define" && $2 ~ /__HYPERVISOR_[a-z][a-z_0-9]*/ { v[$3] = $2 }
END { print "/* auto-generated by scripts/xen-hypercall.sh */"
for (i in v) if (!(v[i] in v))
print "HYPERCALL("substr(v[i], 14)")"}' | sort -u >$out