xref: /minix/minix/kernel/extract-mtype.sh (revision 83133719)
1#!/bin/sh
2
3set -e
4
5# grep message type constants and make them into a .h file
6(
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]+\)'
11
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_ +]+\)'
16
17) | cut -d' ' -f2 | sed 's/\(.*\)/IDENT(\1)/' | sort
18