strsyscall.c (324B)
1 #include <stdio.h> 2 #include <asm/unistd.h> 3 4 static char *syscall_names[] = { 5 }; 6 7 8 #define nelem(x) (sizeof(x)/sizeof((x)[0])) 9 10 char *strsyscall(int n) { 11 if (0 <= n && n < nelem(syscall_names) && syscall_names[n]) 12 return syscall_names[n]; 13 static char buf[40]; 14 snprintf(buf, sizeof buf, "syscall%#x", n); 15 return buf; 16 } 17