From 29f0d05cee0805346e1f3372fc0d67e5a3c3d761 Mon Sep 17 00:00:00 2001 From: Wichert Akkerman Date: Sat, 31 Mar 2001 16:14:55 +0000 Subject: [PATCH] add dir variable to set location of kernel includes --- ChangeLog | 4 ++++ linux/ioctlent.sh | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index fcb57497..65112b0d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2001-03-31 Wichert Akkerman + + * linux/ioctlent.sh: add dir variable for location of kernel headers + 2001-03-29 Wichert Akkerman * linux/ia64/ioctlent.h: updated using new Linux ioctl setup diff --git a/linux/ioctlent.sh b/linux/ioctlent.sh index 8493e239..1fadff1c 100644 --- a/linux/ioctlent.sh +++ b/linux/ioctlent.sh @@ -1,10 +1,11 @@ #! /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 @@ -15,7 +16,8 @@ bases=$(sed -ne 's/.*_IOC_NONE,\([A-Z][A-Z0-9_]\+\),.*/\1/p' ioctls.h | uniq | s 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 -- 2.40.0