Much USB code for ARM USB support
[minix3.git] / minix / kernel / extract-mtype.sh
blob25982162462939721b10ff18eeeead9c28f8f2ab
1 #!/bin/sh
3 set -e
5 # grep message type constants and make them into a .h file
7 cat ../include/minix/callnr.h | \
8 tr -s ' \t' ' ' | \
9 sed 's/^# /#/' | \
10 egrep '^#define [A-Z_][A-Z0-9_]* \((PM|VFS)_BASE \+ *[0-9]+\)'
12 cat ../include/minix/com.h | \
13 tr -s ' \t' ' ' | \
14 sed 's/^# /#/' | \
15 egrep '^#define [A-Z_][A-Z0-9_]* \( ?([A-Z0-9_]+_BASE|KERNEL_CALL) ?\+[A-Za-z0-9_ +]+\)'
17 ) | cut -d' ' -f2 | sed 's/\(.*\)/IDENT(\1)/' | sort