]> granicus.if.org Git - strace/commitdiff
add dir variable to set location of kernel includes
authorWichert Akkerman <wichert@deephackmode.org>
Sat, 31 Mar 2001 16:14:55 +0000 (16:14 +0000)
committerWichert Akkerman <wichert@deephackmode.org>
Sat, 31 Mar 2001 16:14:55 +0000 (16:14 +0000)
ChangeLog
linux/ioctlent.sh

index fcb574979cde04030789b3265e1623872b7aef74..65112b0dd35696fa2c92440b1833ec1a559def26 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+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
index 8493e239844597a79348ab324b20c004f8e9fa28..1fadff1cec84f296825fb669cbd6fc73445be6fe 100644 (file)
@@ -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