xref: /kernel/linux/linux-5.10/tools/perf/trace/beauty/move_mount_flags.sh
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-5.10/tools/perf/trace/beauty/
18c2ecf20Sopenharmony_ci#!/bin/sh
28c2ecf20Sopenharmony_ci# SPDX-License-Identifier: LGPL-2.1
38c2ecf20Sopenharmony_ci
48c2ecf20Sopenharmony_ciif [ $# -ne 1 ] ; then
58c2ecf20Sopenharmony_ci	linux_header_dir=tools/include/uapi/linux
68c2ecf20Sopenharmony_cielse
78c2ecf20Sopenharmony_ci	linux_header_dir=$1
88c2ecf20Sopenharmony_cifi
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_cilinux_mount=${linux_header_dir}/mount.h
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ciprintf "static const char *move_mount_flags[] = {\n"
138c2ecf20Sopenharmony_ciregex='^[[:space:]]*#[[:space:]]*define[[:space:]]+MOVE_MOUNT_([FT]_[[:alnum:]_]+)[[:space:]]+(0x[[:xdigit:]]+)[[:space:]]*.*'
148c2ecf20Sopenharmony_ciegrep $regex ${linux_mount} | \
158c2ecf20Sopenharmony_ci	sed -r "s/$regex/\2 \1/g"	| \
168c2ecf20Sopenharmony_ci	xargs printf "\t[ilog2(%s) + 1] = \"%s\",\n"
178c2ecf20Sopenharmony_ciprintf "};\n"
18

Indexes created Thu Nov 07 10:32:03 CST 2024