minix/minix/kernel/extract-mtype.sh
Lionel Sambuc 433d6423c3 New sources layout
Change-Id: Ic716f336b7071063997cf5b4dae6d50e0b4631e9
2014-07-31 16:00:30 +02:00

18 lines
440 B
Bash

#!/bin/sh
set -e
# grep message type constants and make them into a .h file
(
cat ../include/minix/callnr.h | \
tr -s ' \t' ' ' | \
sed 's/^# /#/' | \
egrep '^#define [A-Z_][A-Z0-9_]* \((PM|VFS)_BASE \+ *[0-9]+\)'
cat ../include/minix/com.h | \
tr -s ' \t' ' ' | \
sed 's/^# /#/' | \
egrep '^#define [A-Z_][A-Z0-9_]* \( ?([A-Z0-9_]+_BASE|KERNEL_CALL) ?\+[A-Za-z0-9_ +]+\)'
) | cut -d' ' -f2 | sed 's/\(.*\)/IDENT(\1)/' | sort