hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/tools/perf/trace/beauty/prctl_option.sh
....@@ -1,9 +1,10 @@
11 #!/bin/sh
2
+# SPDX-License-Identifier: LGPL-2.1
23
34 [ $# -eq 1 ] && header_dir=$1 || header_dir=tools/include/uapi/linux/
45
56 printf "static const char *prctl_options[] = {\n"
6
-regex='^#define[[:space:]]+PR_([GS]ET\w+)[[:space:]]*([[:xdigit:]]+).*'
7
+regex='^#define[[:space:]]+PR_(\w+)[[:space:]]*([[:xdigit:]]+).*'
78 egrep $regex ${header_dir}/prctl.h | grep -v PR_SET_PTRACER | \
89 sed -r "s/$regex/\2 \1/g" | \
910 sort -n | xargs printf "\t[%s] = \"%s\",\n"