2004-05-02 Dmitry V. Levin <ldv@altlinux.org>
* linux/ioctlent.sh: Build the list of ioctls defined in linux/fb.h (0x46..), linux/kd.h (0x4B..), linux/cdrom.h (0x53..), asm/ioctls.h (0x54..), linux/vt.h (0x56..), linux/videotext.h (0x71..), linux/videotext.h (0x72..), asm/sockios.h (0x89..), linux/sockios.h (0x89..), linux/wireless.h (0x8B..).
This commit is contained in:
parent
3dfd799d11
commit
718f9a692f
@ -37,12 +37,27 @@ fi
|
||||
|
||||
dir=$1
|
||||
|
||||
files="asm/ioctls.h /dev/null"
|
||||
# Build the list of all ioctls
|
||||
regexp='^[[:space:]]*#[[:space:]]*define[[:space:]]\+[A-Z][A-Z0-9_]*[[:space:]]\+0x54..\>'
|
||||
(cd $dir ; grep $regexp $files 2>/dev/null ) | \
|
||||
sed -ne 's/^\(.*\):[[:space:]]*#[[:space:]]*define[[:space:]]*\([A-Z0-9_]*\)[[:space:]]*\(0x54..\).*/ { "\1", "\2", \3 },/p' \
|
||||
> ioctls.h
|
||||
lookup_ioctls()
|
||||
{
|
||||
type="$1"
|
||||
shift
|
||||
|
||||
# Build the list of all ioctls
|
||||
regexp='^[[:space:]]*#[[:space:]]*define[[:space:]]\+[A-Z][A-Z0-9_]*[[:space:]]\+0x'"$type"'..\>'
|
||||
(cd "$dir" ; grep "$regexp" "$@" /dev/null 2>/dev/null ) |
|
||||
sed -ne 's/^\(.*\):[[:space:]]*#[[:space:]]*define[[:space:]]*\([A-Z0-9_]*\)[[:space:]]*\(0x'"$type"'..\).*/ { "\1", "\2", \3 },/p' \
|
||||
>> ioctls.h
|
||||
}
|
||||
|
||||
: > ioctls.h
|
||||
lookup_ioctls 46 linux/fb.h
|
||||
lookup_ioctls 4B linux/kd.h
|
||||
lookup_ioctls 53 linux/cdrom.h
|
||||
lookup_ioctls 54 asm/ioctls.h
|
||||
lookup_ioctls 56 linux/vt.h
|
||||
lookup_ioctls '7[12]' linux/videotext.h
|
||||
lookup_ioctls 89 asm/sockios.h linux/sockios.h
|
||||
lookup_ioctls 8B linux/wireless.h
|
||||
|
||||
files="linux/* asm/* scsi/* sound/*"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user