File Index
Files and directories
Sign in
FILE

kcmp_type.sh

File preview with syntax highlighting.

linux-6.19.14/tools/perf/trace/beauty/kcmp_type.sh BASH
 1#!/bin/sh
 2# SPDX-License-Identifier: LGPL-2.1
 3
 4[ $# -eq 1 ] && header_dir=$1 || header_dir=tools/include/uapi/linux/
 5
 6printf "static const char *kcmp_types[] = {\n"
 7regex='^[[:space:]]+(KCMP_(\w+)),'
 8grep -E $regex ${header_dir}/kcmp.h | grep -v KCMP_TYPES, | \
 9	sed -r "s/$regex/\1 \2/g" | \
10	xargs printf "\t[%s]\t= \"%s\",\n"
11printf "};\n"
~/ Read-only file preview.