Artifact e1301e6d160fe83bc8b03901a13d980f6be97a4f00a7f64ed2150192de5a1db4:
- Executable file arch/mktbl.errno.linux.sh — part of check-in [b9dd92f73e] at 2019-08-25 00:16:41 on branch trunk — arch: add crude script to generate errno tables from Linux sources (user: lachs0r, size: 406) [annotate] [blame] [check-ins using]
#!/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"