kill dentry_update_name_case()
[sfrench/cifs-2.6.git] / tools / perf / trace / beauty / vhost_virtio_ioctl.sh
1 #!/bin/sh
2
3 vhost_virtio_header_dir=$1
4
5 printf "static const char *vhost_virtio_ioctl_cmds[] = {\n"
6 regex='^#[[:space:]]*define[[:space:]]+VHOST_(\w+)[[:space:]]+_IOW?\([[:space:]]*VHOST_VIRTIO[[:space:]]*,[[:space:]]*(0x[[:xdigit:]]+).*'
7 egrep $regex ${vhost_virtio_header_dir}/vhost.h | \
8         sed -r "s/$regex/\2 \1/g"       | \
9         sort | xargs printf "\t[%s] = \"%s\",\n"
10 printf "};\n"
11
12 printf "static const char *vhost_virtio_ioctl_read_cmds[] = {\n"
13 regex='^#[[:space:]]*define[[:space:]]+VHOST_(\w+)[[:space:]]+_IOW?R\([[:space:]]*VHOST_VIRTIO[[:space:]]*,[[:space:]]*(0x[[:xdigit:]]+).*'
14 egrep $regex ${vhost_virtio_header_dir}/vhost.h | \
15         sed -r "s/$regex/\2 \1/g"       | \
16         sort | xargs printf "\t[%s] = \"%s\",\n"
17 printf "};\n"