1 #!/bin/sh 2 # SPDX-License-Identifier: LGPL-2.1 3 4 [ $# -eq 1 ] && beauty_uapi_linux_dir=$1 || be 5 6 # also as: 7 # #define USBDEVFS_CONNINFO_EX(len) _IOC(_IOC 8 9 printf "static const char *usbdevfs_ioctl_cmds 10 regex="^#[[:space:]]*define[[:space:]]+USBDEVF 11 grep -E "$regex" ${beauty_uapi_linux_dir}/usbd 12 sed -r "s/$regex/\4 \1/g" | \ 13 sort | xargs printf "\t[%s] = \"%s\",\ 14 printf "};\n\n" 15 printf "#if 0\n" 16 printf "static const char *usbdevfs_ioctl_32_c 17 regex="^#[[:space:]]*define[[:space:]]+USBDEVF 18 grep -E $regex ${beauty_uapi_linux_dir}/usbdev 19 sed -r "s/$regex/\2 \1/g" | \ 20 sort | xargs printf "\t[%s] = \"%s\",\ 21 printf "};\n" 22 printf "#endif\n"
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.