]> granicus.if.org Git - strace/commitdiff
Patch by Mike Frysinger (vapier AT gentoo.org).
authorDenys Vlasenko <dvlasenk@redhat.com>
Fri, 20 Feb 2009 17:32:34 +0000 (17:32 +0000)
committerDenys Vlasenko <dvlasenk@redhat.com>
Fri, 20 Feb 2009 17:32:34 +0000 (17:32 +0000)
* linux/ioctlent.sh: Update sed machinery to parse _IOC() macros
with two constants.

ChangeLog
linux/ioctlent.sh

index 2fdb2321d06888dc87bb8a738712a50560006799..abc84e4261bd3bde1552a6bd9b2e268e555fed31 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-02-20  Denys Vlasenko  <dvlasenk@redhat.com>
+
+       Patch by Mike Frysinger (vapier AT gentoo.org).
+       * linux/ioctlent.sh: Update sed machinery to parse _IOC() macros
+       with two constants.
+
 2009-02-20  Denys Vlasenko  <dvlasenk@redhat.com>
 
        Patch by Mike Frysinger (vapier AT gentoo.org).
index 1242ff0eece09155a9d6bdd0b9e72249cb167d95..fae3bd9ec7aa6e224ec5c59072e8d662941b577a 100644 (file)
@@ -78,9 +78,13 @@ s/^\(.*\):[[:space:]]*#[[:space:]]*define[[:space:]]*\([A-Z0-9_]*\)[[:space:]]*_
        >> ioctls.h
 
 # Some use a special base to offset their ioctls on. Extract that as well.
+# Some use 2 defines: _IOC(_IOC_NONE,DM_IOCTL,DM_LIST_DEVICES_CMD,....)
 : > ioctldefs.h
 
-bases=$(sed -ne 's/.*_IOC_NONE.*,[[:space:]]*\([A-Z][A-Z0-9_]\+\)[[:space:]+,].*/\1/p' ioctls.h | uniq | sort)
+bases=$(sed -n \
+       -e 's/.*_IOC_NONE.*,[[:space:]]*\([A-Z][A-Z0-9_]\+\)[[:space:]]*,[[:space:]]*\([A-Z][A-Z0-9_]\+\)[[:space:]+,].*/\1\n\2/p' \
+       -e 's/.*_IOC_NONE.*,[[:space:]]*\([A-Z][A-Z0-9_]\+\)[[:space:]+,].*/\1/p' \
+       ioctls.h | sort | uniq)
 for base in $bases ; do
        echo "Looking for $base"
        regexp="^[[:space:]]*#[[:space:]]*define[[:space:]]\+$base"