1 #!/bin/sh 1 #!/bin/sh 2 # SPDX-License-Identifier: LGPL-2.1 2 # SPDX-License-Identifier: LGPL-2.1 3 3 4 if [ $# -ne 1 ] ; then 4 if [ $# -ne 1 ] ; then 5 beauty_uapi_linux_dir=tools/perf/trace 5 beauty_uapi_linux_dir=tools/perf/trace/beauty/include/uapi/linux/ 6 else 6 else 7 beauty_uapi_linux_dir=$1 7 beauty_uapi_linux_dir=$1 8 fi 8 fi 9 9 10 linux_sched=${beauty_uapi_linux_dir}/sched.h 10 linux_sched=${beauty_uapi_linux_dir}/sched.h 11 11 12 printf "static const char *clone_flags[] = {\n 12 printf "static const char *clone_flags[] = {\n" 13 regex='^[[:space:]]*#[[:space:]]*define[[:spac 13 regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+CLONE_([^_]+[[:alnum:]_]+)[[:space:]]+(0x[[:xdigit:]]+)[[:space:]]*.*' 14 grep -E $regex ${linux_sched} | \ 14 grep -E $regex ${linux_sched} | \ 15 sed -r "s/$regex/\2 \1/g" | \ 15 sed -r "s/$regex/\2 \1/g" | \ 16 xargs printf "\t[ilog2(%s) + 1] = \"%s 16 xargs printf "\t[ilog2(%s) + 1] = \"%s\",\n" 17 printf "};\n" 17 printf "};\n"
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.