minix/kernel/extract-errno.sh
Ben Gras a64a836a3f kernel: fixes for DEBUG_DUMPIPC mode
. add dependency of headers on debug.d
	. put the generated headers in the right dir
	. also resilience against future ELAST duplicate errno

Change-Id: I9d10702c8e09699a40138193f14defe902399da6
2013-09-24 08:26:53 +00:00

12 lines
283 B
Bash

#!/bin/sh
set -e
# grep message type and errno constants and make them into a .h file
cat ../sys/sys/errno.h | \
tr -s ' \t' ' ' | \
sed 's/^# /#/' | \
egrep '^#define [A-Z_][A-Z0-9_]* \( ?_SIGN ?[0-9]+ ?\)' | \
cut -d' ' -f2 | \
sed 's/\(.*\)/IDENT(\1)/' | grep -v ELAST | \
sort