mirror of
https://github.com/torvalds/linux.git
synced 2026-12-04 04:14:24 +00:00
$ tools/perf/trace/beauty/fsconfig.sh
static const char *fsconfig_cmds[] = {
[0] = "SET_FLAG",
[1] = "SET_STRING",
[2] = "SET_BINARY",
[3] = "SET_PATH",
[4] = "SET_PATH_EMPTY",
[5] = "SET_FD",
[6] = "CMD_CREATE",
[7] = "CMD_RECONFIGURE",
};
$
Cc: Adrian Hunter <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Brendan Gregg <[email protected]>
Cc: David Howells <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Link: https://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
18 lines
459 B
Bash
Executable File
18 lines
459 B
Bash
Executable File
#!/bin/sh
|
|
# SPDX-License-Identifier: LGPL-2.1
|
|
|
|
if [ $# -ne 1 ] ; then
|
|
linux_header_dir=tools/include/uapi/linux
|
|
else
|
|
linux_header_dir=$1
|
|
fi
|
|
|
|
linux_mount=${linux_header_dir}/mount.h
|
|
|
|
printf "static const char *fsconfig_cmds[] = {\n"
|
|
regex='^[[:space:]]*+FSCONFIG_([[:alnum:]_]+)[[:space:]]*=[[:space:]]*([[:digit:]]+)[[:space:]]*,[[:space:]]*.*'
|
|
egrep $regex ${linux_mount} | \
|
|
sed -r "s/$regex/\2 \1/g" | \
|
|
xargs printf "\t[%s] = \"%s\",\n"
|
|
printf "};\n"
|