/^#/ { next; }
NF == 1 { f[nf++] = $0; }
END {
printf("/* this file mechanically generated; do not edit */\n");
printf("#include <u.h>\n");
printf("#include <libc.h>\n");
printf("#include \"linux.h\"\n");
printf("#include \"linuxsys.h\"\n");
printf("\n");
for(i=0; i<nf; i++) {
printf("SYSCALL(sys_%s);\n", f[i]);
}
printf("\n");
printf("Syscall syscalltab[] = {\n");
for(i=0; i<nf; i++) {
printf("[L%s] sys_%s,\n", f[i], f[i]);
}
printf("};\n");
}
|