Index: lib/libsysdecode/mktables =================================================================== --- lib/libsysdecode/mktables +++ lib/libsysdecode/mktables @@ -54,7 +54,7 @@ # gen_table() { - local name grep file excl filter + local name grep file excl filter _f name=$1 grep=$2 file=$3 @@ -68,16 +68,18 @@ cat <<_EOF_ TABLE_START(${name}) _EOF_ - if [ -e "${include_dir}/${file}" ]; then - all_headers="${all_headers:+${all_headers} }${file}" - egrep "^#[[:space:]]*define[[:space:]]+"${grep}"[[:space:]]*" \ - $include_dir/$file | ${filter} ${excl} | \ - awk '{ for (i = 1; i <= NF; i++) \ - if ($i ~ /define/) \ - break; \ - ++i; \ - printf "TABLE_ENTRY(%s)\n", $i }' - fi + for _f in ${file}; do + if [ -e "${include_dir}/${_f}" ]; then + all_headers="${all_headers:+${all_headers} }${_f}" + egrep "^#[[:space:]]*define[[:space:]]+"${grep}"[[:space:]]*" \ + $include_dir/$_f | ${filter} ${excl} | \ + awk '{ for (i = 1; i <= NF; i++) \ + if ($i ~ /define/) \ + break; \ + ++i; \ + printf "TABLE_ENTRY(%s)\n", $i }' + fi + done cat <<_EOF_ TABLE_END @@ -125,7 +127,7 @@ gen_table "sendfileflags" "SF_[A-Z]+[[:space:]]+[0-9]+" "sys/socket.h" gen_table "shmatflags" "SHM_[A-Z]+[[:space:]]+[0-9]{6}+" "sys/shm.h" gen_table "shutdownhow" "SHUT_[A-Z]+[[:space:]]+[0-9]+" "sys/socket.h" -gen_table "sigbuscode" "BUS_[A-Z]+[[:space:]]+[0-9]+" "sys/signal.h" +gen_table "sigbuscode" "BUS_[A-Z_]+[[:space:]]+([0-9]+|T_[A-Z_]+)" "sys/signal.h x86/trap.h" gen_table "sigchldcode" "CLD_[A-Z]+[[:space:]]+[0-9]+" "sys/signal.h" gen_table "sigfpecode" "FPE_[A-Z]+[[:space:]]+[0-9]+" "sys/signal.h" gen_table "sigprocmaskhow" "SIG_[A-Z]+[[:space:]]+[0-9]+" "sys/signal.h" @@ -146,7 +148,7 @@ gen_table "thrcreateflags" "THR_[A-Z]+[[:space:]]+0x[0-9]+" "sys/thr.h" gen_table "umtxop" "UMTX_OP_[[:alnum:]_]+[[:space:]]+[0-9]+" "sys/umtx.h" gen_table "vmprot" "VM_PROT_[A-Z]+[[:space:]]+\(\(vm_prot_t\)[[:space:]]+0x[0-9]+\)" "vm/vm.h" -gen_table "vmresult" "KERN_[A-Z]+[[:space:]]+[0-9]+" "vm/vm_param.h" +gen_table "vmresult" "KERN_[A-Z_]+[[:space:]]+[0-9]+" "vm/vm_param.h" gen_table "wait6opt" "W[A-Z]+[[:space:]]+[0-9]+" "sys/wait.h" gen_table "seekwhence" "SEEK_[A-Z]+[[:space:]]+[0-9]+" "sys/unistd.h" gen_table "fcntlcmd" "F_[A-Z0-9_]+[[:space:]]+[0-9]+[[:space:]]+" "sys/fcntl.h" "F_CANCEL|F_..LCK"