2 # SPDX-License-Identifier: LGPL-2.1
5 beauty_uapi_linux_dir
=tools
/perf
/trace
/beauty
/include
/uapi
/linux
/
7 beauty_uapi_linux_dir
=$1
10 linux_stat
=${beauty_uapi_linux_dir}/stat.h
12 printf "static const char *statx_mask[] = {\n"
13 regex
='^[[:space:]]*#[[:space:]]*define[[:space:]]+STATX_([^_]+[[:alnum:]_]+)[[:space:]]+(0x[[:xdigit:]]+)[[:space:]]*.*'
14 # STATX_BASIC_STATS its a bitmask formed by the mask in the normal stat struct
15 # STATX_ALL is another bitmask and deprecated
16 # STATX_ATTR_*: Attributes to be found in stx_attributes and masked in stx_attributes_mask
17 grep -E $regex ${linux_stat} | \
19 grep -v STATX_BASIC_STATS | \
20 grep -v '\<STATX_ATTR_' | \
21 sed -r "s/$regex/\2 \1/g" | \
22 xargs printf "\t[ilog2(%s) + 1] = \"%s\",\n"