X-Git-Url: http://git.monstr.eu/?p=linux-2.6-microblaze.git;a=blobdiff_plain;f=tools%2Fperf%2Ftrace%2Fbeauty%2Fmove_mount_flags.sh;fp=tools%2Fperf%2Ftrace%2Fbeauty%2Fmove_mount_flags.sh;h=55e59241daa4d69f044d72cd7302f62daa913a48;hp=0000000000000000000000000000000000000000;hb=eefa09b499d12883f2fad46f93379101c8da6fec;hpb=8a70c6b162e3112ce87b40b1705da5c4e7566ac8 diff --git a/tools/perf/trace/beauty/move_mount_flags.sh b/tools/perf/trace/beauty/move_mount_flags.sh new file mode 100755 index 000000000000..55e59241daa4 --- /dev/null +++ b/tools/perf/trace/beauty/move_mount_flags.sh @@ -0,0 +1,17 @@ +#!/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 *move_mount_flags[] = {\n" +regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+MOVE_MOUNT_([FT]_[[:alnum:]_]+)[[:space:]]+(0x[[:xdigit:]]+)[[:space:]]*.*' +egrep $regex ${linux_mount} | \ + sed -r "s/$regex/\2 \1/g" | \ + xargs printf "\t[ilog2(%s) + 1] = \"%s\",\n" +printf "};\n"