From 3566e3d5f2e1c90ab8a918fef101f843bf610d81 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 20 Feb 2009 17:32:34 +0000 Subject: [PATCH] Patch by Mike Frysinger (vapier AT gentoo.org). * linux/ioctlent.sh: Update sed machinery to parse _IOC() macros with two constants. --- ChangeLog | 6 ++++++ linux/ioctlent.sh | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2fdb2321..abc84e42 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-02-20 Denys Vlasenko + + 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 Patch by Mike Frysinger (vapier AT gentoo.org). diff --git a/linux/ioctlent.sh b/linux/ioctlent.sh index 1242ff0e..fae3bd9e 100644 --- a/linux/ioctlent.sh +++ b/linux/ioctlent.sh @@ -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" -- 2.40.0