summaryrefslogtreecommitdiff
path: root/minix/kernel/extract-errno.sh
blob: 99b476599d93ea6ca16ab1438d5cd9dabf9235ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/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