1set -e 2
| 1set -e 2
|
3# $FreeBSD: head/usr.bin/kdump/mkioctls 74840 2001-03-27 05:45:52Z ken $
| 3# $FreeBSD: head/usr.bin/kdump/mkioctls 74864 2001-03-27 16:15:25Z ru $
|
4 5if [ "x$1" = "x-s" ]; then 6 use_switch=1 7 shift 8else 9 use_switch=0 10fi 11 12if [ -z "$1" ]; then 13 echo "usage: sh $0 [-s] include-dir" 14 exit 1 15fi 16 17# Build a list of headers that have ioctls in them. 18# XXX should we use an ANSI cpp? 19# XXX netipx conflicts with netns (leave out netns). 20ioctl_includes=` 21 cd $1
| 4 5if [ "x$1" = "x-s" ]; then 6 use_switch=1 7 shift 8else 9 use_switch=0 10fi 11 12if [ -z "$1" ]; then 13 echo "usage: sh $0 [-s] include-dir" 14 exit 1 15fi 16 17# Build a list of headers that have ioctls in them. 18# XXX should we use an ANSI cpp? 19# XXX netipx conflicts with netns (leave out netns). 20ioctl_includes=` 21 cd $1
|
22 find * -name '*.h' -follow |
| 22 find -s * -name '*.h' -follow |
|
23 egrep -v '^(netns)/' | 24 xargs egrep -l \ 25'^#[ ]*define[ ]+[A-Za-z_][A-Za-z0-9_]*[ ]+_IO[^a-z0-9_]' | 26 sed -e 's/^/#include </' -e s'/$/>/' 27` 28 29echo "$ioctl_includes" | 30 gcc -E -I$1 -dM - |
--- 63 unchanged lines hidden --- | 23 egrep -v '^(netns)/' | 24 xargs egrep -l \ 25'^#[ ]*define[ ]+[A-Za-z_][A-Za-z0-9_]*[ ]+_IO[^a-z0-9_]' | 26 sed -e 's/^/#include </' -e s'/$/>/' 27` 28 29echo "$ioctl_includes" | 30 gcc -E -I$1 -dM - |
--- 63 unchanged lines hidden --- |