Overview
Comment: | arch: add crude script to generate errno tables from Linux sources |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
b9dd92f73ed5e4b6985c3a21080e4c55 |
User & Date: | lachs0r on 2019-08-25 00:16:41 |
Other Links: | manifest | tags |
Context
2019-08-25
| ||
00:29 | delete unnecessary scripts check-in: 76f1cf8037 user: lexi tags: trunk | |
00:16 | arch: add crude script to generate errno tables from Linux sources check-in: b9dd92f73e user: lachs0r tags: trunk | |
2019-08-24
| ||
23:40 | parse environment and add env variables to the kenv struct passed to the entry function; add example code to testbin showing use of kvars check-in: 81758652b5 user: lexi tags: trunk | |
Changes
Added arch/mktbl.errno.linux.sh version [e1301e6d16].
1 +#!/usr/bin/env bash 2 +set -eu 3 + 4 +OUTDIR=$1 5 +ABI=$2 6 + 7 +INC_DEF=/usr/src/linux 8 +p_include="${LINUX_SRC:-$INC_DEF}" 9 +p_uapi="$p_include/tools/include/uapi" 10 + 11 +cpp -D__"$ABI"__ -undef -dM -I"$p_uapi" "$p_uapi/asm/errno.h" | sort -nrk3 | awk '{ 12 +split($0, a, " "); 13 +if (a[2] !~ "^_"){ 14 + ids[a[2]] = a[3]; 15 + if (a[3] ~ /^[0-9]+$/) val=a[3]; 16 + else val=ids[a[3]]; 17 + print a[2] " " val; 18 +}}' | sort -nk2 > "$OUTDIR/error_table.tbl"