Merge tag 'safesetid-5.13' of git://github.com/micah-morton/linux
[linux-2.6-microblaze.git] / tools / perf / trace / beauty / fsconfig.sh
1 #!/bin/sh
2 # SPDX-License-Identifier: LGPL-2.1
3
4 if [ $# -ne 1 ] ; then
5         linux_header_dir=tools/include/uapi/linux
6 else
7         linux_header_dir=$1
8 fi
9
10 linux_mount=${linux_header_dir}/mount.h
11
12 printf "static const char *fsconfig_cmds[] = {\n"
13 ms='[[:space:]]*'
14 sed -nr "s/^${ms}FSCONFIG_([[:alnum:]_]+)${ms}=${ms}([[:digit:]]+)${ms},.*/\t[\2] = \"\1\",/p" \
15         ${linux_mount}
16 printf "};\n"