+2001-03-31 Wichert Akkerman <wakkerma@debian.org>
+
+ * linux/ioctlent.sh: add dir variable for location of kernel headers
+
2001-03-29 Wichert Akkerman <wakkerma@debian.org>
* linux/ia64/ioctlent.h: updated using new Linux ioctl setup
#! /bin/sh
+dir="/tmp/include"
files="linux/* asm/* scsi/*"
# Build the list of all ioctls
regexp='^[[:space:]]*#[[:space:]]*define[[:space:]]\+[A-Z][A-Z0-9_]*[[:space:]]\+_\(IO\|IOW\|IOR\|IOWR\)\>'
-grep $regexp $files 2>/dev/null | \
+(cd $dir ; grep $regexp $files 2>/dev/null ) | \
sed -ne 's/^\(.*\):[[:space:]]*#[[:space:]]*define[[:space:]]*\([A-Z0-9_]*\)[[:space:]]*_I.*(\([^[,]*\),\([^,)]*\).*/ { "\1", "\2", _IOC(_IOC_NONE,\3,\4,0) },/p' \
> ioctls.h
for base in $bases ; do
echo "Looking for $base"
regexp="^[[:space:]]*#[[:space:]]*define[[:space:]]\+$base"
- grep -h $regexp 2>/dev/null $files | grep -v '\<_IO' >> ioctldefs.h
+ (cd $dir ; grep -h $regexp 2>/dev/null $files ) | \
+ grep -v '\<_IO' >> ioctldefs.h
done