Patch by Mike Frysinger (vapier AT gentoo.org).
* linux/ioctlent.sh: Update sed machinery to parse _IOC() macros with two constants.
This commit is contained in:
parent
53560265c6
commit
3566e3d5f2
@ -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).
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user