Link: https://lore.kernel.org/r/20260217200002.683975158@linuxfoundation.org Tested-by: Florian Fainelli <florian.fainelli@broadcom.com> Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com> Tested-by: Peter Schneider <pschneider1968@googlemail.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Salvatore Bonaccorso <carnil@debian.org> Tested-by: Brett A C Sheffield <bacs@librecast.net> Tested-by: Mark Brown <broonie@kernel.org> Tested-by: Luna Jernberg <droidbittin@gmail.com> Tested-by: Ronald Warsow <rwarsow@gmx.de> Tested-by: Justin M. Forbes <jforbes@fedoraproject.org> Tested-by: Ron Economos <re@w6rz.net> Tested-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16 lines
763 B
Bash
Executable File
16 lines
763 B
Bash
Executable File
#!/bin/sh
|
|
# SPDX-License-Identifier: LGPL-2.1
|
|
|
|
[ $# -eq 1 ] && beauty_uapi_linux_dir=$1 || beauty_uapi_linux_dir=tools/perf/trace/beauty/include/uapi/linux/
|
|
|
|
printf "static const char *mount_flags[] = {\n"
|
|
regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+MS_([[:alnum:]_]+)[[:space:]]+([[:digit:]]+)[[:space:]]*.*'
|
|
grep -E $regex ${beauty_uapi_linux_dir}/mount.h | grep -E -v '(MSK|VERBOSE|MGC_VAL)\>' | \
|
|
sed -r "s/$regex/\2 \2 \1/g" | sort -n | \
|
|
xargs printf "\t[%s ? (ilog2(%s) + 1) : 0] = \"%s\",\n"
|
|
regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+MS_([[:alnum:]_]+)[[:space:]]+\(1<<([[:digit:]]+)\)[[:space:]]*.*'
|
|
grep -E $regex ${beauty_uapi_linux_dir}/mount.h | \
|
|
sed -r "s/$regex/\2 \1/g" | \
|
|
xargs printf "\t[%s + 1] = \"%s\",\n"
|
|
printf "};\n"
|