brintos

brintos / linux-shallow public Read only

0
0
Text · 502 B · b1084c4 Raw
18 lines · bash
1#!/bin/sh2# SPDX-License-Identifier: LGPL-2.13 4if [ $# -ne 1 ] ; then5	linux_header_dir=tools/perf/trace/beauty/include/uapi/linux/6else7	linux_header_dir=$18fi9 10linux_fs=${linux_header_dir}/fs.h11 12printf "static const char *sync_file_range_flags[] = {\n"13regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+SYNC_FILE_RANGE_([[:alnum:]_]+)[[:space:]]+([[:xdigit:]]+)[[:space:]]*.*'14grep -E $regex ${linux_fs} | \15	sed -r "s/$regex/\2 \1/g"	| \16	xargs printf "\t[ilog2(%s) + 1] = \"%s\",\n"17printf "};\n"18