3 # tested with linux 2.2.14
4 # reads <asm/unistd.h>, outputs syscalls-linux.h
8 //////////////////////////////////////////////////////////////////////////////
9 // Linux system call table
10 //////////////////////////////////////////////////////////////////////////////
12 // Format for each entry:
13 // DEF_LINUX_SYSCALL(syscall_number, "syscall_name")
14 // This file can be regenerated with the following command:
16 // ./make-syscalls-linux.pl < /usr/include/asm/unistd.h > syscalls-linux.h
23 next unless /#define __NR_[a-z]/;
26 ($name, $number) = split (/[\s]+/);
27 if ((length $number) < 1) {
28 die "bad line: $line";
30 if ($number > $max) { $max = $number; }
31 print "DEF_SYSCALL($number, \"$name\")\n";
34 print "#define N_SYSCALLS $max\n";