1 #!/bin/sh 2 # SPDX-License-Identifier: LGPL-2.1 3 4 [ $# -eq 1 ] && header_dir=$1 || header_dir=to 5 6 printf "static const char *fadvise_advices[] = 7 regex='^[[:space:]]*#[[:space:]]*define[[:spac 8 9 grep -E $regex ${header_dir}/fadvise.h | \ 10 sed -r "s/$regex/\2 \1/g" | \ 11 sort | xargs printf "\t[%s] = \"%s\",\ 12 grep -v "[6].*DONTNEED" | grep -v "[7] 13 printf "};\n" 14 15 # XXX Fix this properly: 16 17 # The grep 6/7 DONTNEED/NOREUSE are a hack to 18 # tools/include/uapi/linux/fadvise.h for detai 19 20 # Probably fix this when generating the string 21 # reliably process on arch FOO a perf.data fil 22 # record' on arch BAR, e.g. collect on s/390 a
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.