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