diff options
| author | Dmitry V. Levin <ldv@altlinux.org> | 2013-06-03 16:24:53 +0000 |
|---|---|---|
| committer | Dmitry V. Levin <ldv@altlinux.org> | 2013-06-03 16:24:53 +0000 |
| commit | 1cd3f5f844d58b1ced8d3f6dc431688ed94d008e (patch) | |
| tree | 55812ac1ded9bebbd2a30561c3a633f452818b69 /linux/ioctlent.sh | |
| parent | d845411e8c0b315c754d5d45df3103a12f5e876e (diff) | |
| download | strace-4.8.tar.gz strace-4.8.tar.bz2 strace-4.8.tar.xz | |
ioctlent: add UAPI supportv4.8
* Makefile.am (IOCTLSORT_INCLUDEDIR): Define.
(ioctlsort): Use it.
* linux/ioctlent.sh (lookup_ioctls): Look into uapi directory tree.
Strip "uapi/" prefix from output path names.
* linux/ioctlent.h.in: Regenerate from v3.9 headers.
* NEWS: Mention it.
Diffstat (limited to 'linux/ioctlent.sh')
| -rwxr-xr-x | linux/ioctlent.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/linux/ioctlent.sh b/linux/ioctlent.sh index 9bcff5f..c483ba8 100755 --- a/linux/ioctlent.sh +++ b/linux/ioctlent.sh @@ -47,7 +47,7 @@ lookup_ioctls() # 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) | + (cd "$dir" && for f; do grep "$regexp" "$f" "uapi/$f" 2>/dev/null; done) | sed -ne "s,$asm/,asm/,g"' s/^\(.*\):[[:space:]]*#[[:space:]]*define[[:space:]]*\([A-Z0-9_]*\)[[:space:]]*\(0x'"$type"'..\).*/ { "\1", "\2", \3 },/p' \ >> ioctls.h @@ -94,8 +94,11 @@ regexp='^[[:space:]]*#[[:space:]]*define[[:space:]]\+[A-Z][A-Z0-9_]*[[:space:]]\ -e 's/^\(.*\):[[:space:]]*#[[:space:]]*define[[:space:]]*\([A-Z0-9_]*\)[[:space:]]*_S\?I.*(\([^[,]*\)[[:space:]]*,[[:space:]]*\([^,)]*\).*/ { "\1", "\2", _IOC(_IOC_NONE,\3,\4,0) },/p' \ >> ioctls.h -# Sort and drop dups? -# sort -u <ioctls.h >ioctls1.h && mv ioctls1.h ioctls.h +# Strip uapi/ prefix +sed -i 's|"uapi/|"|' ioctls.h + +# Sort and drop dups +sort -u -o ioctls.h ioctls.h > ioctldefs.h |
