]> mj.ucw.cz Git - eval.git/blob - box/mk-syscall-table
Isolate: Polished help text
[eval.git] / box / mk-syscall-table
1 #!/bin/sh
2 set -e
3 echo '/* Syscall table automatically generated by mk-syscall-table */'
4 echo
5 cat <<FOE |
6 #include "autoconf.h"
7 #if defined(CONFIG_BOX_KERNEL_AMD64) && !defined(CONFIG_BOX_USER_AMD64)
8 #include <asm/unistd_32.h>
9 #else
10 #include <asm/unistd.h>
11 #endif
12 FOE
13         gcc -E -dM "$@" - |
14         sed '/__NR_madvise1/d; s/^#define __NR_\([^     ]\+\)[  ]\+\([0-9]\+\).*/\/* \2 *\/ [ __NR_\1 ] = "\1",/;t;d' |
15         sort -k2 -n