libk  Check-in [b9dd92f73e]

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: b9dd92f73ed5e4b6985c3a21080e4c55239c555421cdc10ecd15ebf77f8a550f
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
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env bash
set -eu

OUTDIR=$1
ABI=$2

INC_DEF=/usr/src/linux
p_include="${LINUX_SRC:-$INC_DEF}"
p_uapi="$p_include/tools/include/uapi"

cpp -D__"$ABI"__ -undef -dM -I"$p_uapi" "$p_uapi/asm/errno.h" | sort -nrk3 | awk '{
split($0, a, " ");
if (a[2] !~ "^_"){
	ids[a[2]] = a[3];
	if (a[3] ~ /^[0-9]+$/) val=a[3];
	else val=ids[a[3]];
	print a[2] " " val;
}}' | sort -nk2 > "$OUTDIR/error_table.tbl"