xref: /kernel/linux/linux-6.6/tools/perf/trace/beauty/move_mount_flags.sh
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-6.6/tools/perf/trace/beauty/
162306a36Sopenharmony_ci#!/bin/sh
262306a36Sopenharmony_ci# SPDX-License-Identifier: LGPL-2.1
362306a36Sopenharmony_ci
462306a36Sopenharmony_ciif [ $# -ne 1 ] ; then
562306a36Sopenharmony_ci	linux_header_dir=tools/include/uapi/linux
662306a36Sopenharmony_cielse
762306a36Sopenharmony_ci	linux_header_dir=$1
862306a36Sopenharmony_cifi
962306a36Sopenharmony_ci
1062306a36Sopenharmony_cilinux_mount=${linux_header_dir}/mount.h
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_ciprintf "static const char *move_mount_flags[] = {\n"
1362306a36Sopenharmony_ciregex='^[[:space:]]*#[[:space:]]*define[[:space:]]+MOVE_MOUNT_([^_]+[[:alnum:]_]+)[[:space:]]+(0x[[:xdigit:]]+)[[:space:]]*.*'
1462306a36Sopenharmony_cigrep -E $regex ${linux_mount} | \
1562306a36Sopenharmony_ci	sed -r "s/$regex/\2 \1/g"	| \
1662306a36Sopenharmony_ci	xargs printf "\t[ilog2(%s) + 1] = \"%s\",\n"
1762306a36Sopenharmony_ciprintf "};\n"
18

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