• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 const struct sysnums {
2 	long nr;
3 	const char *snr;
4 } sysnums[] = {
5 #define P(NR) { .nr = SYS_##NR, .snr = #NR, },
6 #include "_syscalls.h"
7 #undef P
8 };
9 
get_sysnum(long nr)10 const char *get_sysnum(long nr)
11 {
12 	int i;
13 	for (i = 0; i < ARRAY_SIZE(sysnums); ++i)
14 		if (sysnums[i].nr == nr)
15 			break;
16 	return i == ARRAY_SIZE(sysnums) ? "???" : sysnums[i].snr;
17 }
18