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>
28 lines
1.1 KiB
Bash
Executable File
28 lines
1.1 KiB
Bash
Executable File
#!/bin/sh
|
|
# SPDX-License-Identifier: LGPL-2.1
|
|
|
|
if [ $# -ne 1 ] ; then
|
|
beauty_uapi_linux_dir=tools/perf/trace/beauty/include/uapi/linux/
|
|
else
|
|
beauty_uapi_linux_dir=$1
|
|
fi
|
|
|
|
linux_fcntl=${beauty_uapi_linux_dir}/fcntl.h
|
|
|
|
printf "static const char *fs_at_flags[] = {\n"
|
|
regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+AT_([^_]+[[:alnum:]_]+)[[:space:]]+(0x[[:xdigit:]]+)[[:space:]]*.*'
|
|
# AT_EACCESS is only meaningful to faccessat, so we will special case it there...
|
|
# AT_STATX_SYNC_TYPE is not a bit, its a mask of AT_STATX_SYNC_AS_STAT, AT_STATX_FORCE_SYNC and AT_STATX_DONT_SYNC
|
|
# AT_HANDLE_FID, AT_HANDLE_MNT_ID_UNIQUE and AT_HANDLE_CONNECTABLE are reusing values and are valid only for name_to_handle_at()
|
|
# AT_RENAME_NOREPLACE reuses 0x1 and is valid only for renameat2()
|
|
grep -E $regex ${linux_fcntl} | \
|
|
grep -v AT_EACCESS | \
|
|
grep -v AT_STATX_SYNC_TYPE | \
|
|
grep -v AT_HANDLE_FID | \
|
|
grep -v AT_HANDLE_MNT_ID_UNIQUE | \
|
|
grep -v AT_HANDLE_CONNECTABLE | \
|
|
grep -v AT_RENAME_NOREPLACE | \
|
|
sed -r "s/$regex/\2 \1/g" | \
|
|
xargs printf "\t[ilog2(%s) + 1] = \"%s\",\n"
|
|
printf "};\n"
|