mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-26 13:45:08 +07:00
794f594e0c
The intention is to have this as a library, since it is not perf specific at all. I did the switch for the files where I'm the only contributor, with the exception of a few lines changed by Jiri Olsa. Acked-by: Jiri Olsa <jolsa@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: https://lkml.kernel.org/n/tip-a04q6chdyjknm1hr305ulx8h@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
19 lines
775 B
Bash
Executable File
19 lines
775 B
Bash
Executable File
#!/bin/sh
|
|
# SPDX-License-Identifier: LGPL-2.1
|
|
|
|
[ $# -eq 1 ] && header_dir=$1 || header_dir=tools/include/uapi/linux/
|
|
|
|
printf "static const char *vhost_virtio_ioctl_cmds[] = {\n"
|
|
regex='^#[[:space:]]*define[[:space:]]+VHOST_(\w+)[[:space:]]+_IOW?\([[:space:]]*VHOST_VIRTIO[[:space:]]*,[[:space:]]*(0x[[:xdigit:]]+).*'
|
|
egrep $regex ${header_dir}/vhost.h | \
|
|
sed -r "s/$regex/\2 \1/g" | \
|
|
sort | xargs printf "\t[%s] = \"%s\",\n"
|
|
printf "};\n"
|
|
|
|
printf "static const char *vhost_virtio_ioctl_read_cmds[] = {\n"
|
|
regex='^#[[:space:]]*define[[:space:]]+VHOST_(\w+)[[:space:]]+_IOW?R\([[:space:]]*VHOST_VIRTIO[[:space:]]*,[[:space:]]*(0x[[:xdigit:]]+).*'
|
|
egrep $regex ${header_dir}/vhost.h | \
|
|
sed -r "s/$regex/\2 \1/g" | \
|
|
sort | xargs printf "\t[%s] = \"%s\",\n"
|
|
printf "};\n"
|