xref: /aosp_15_r20/external/strace/linux/nr_prefix.c (revision cf84ac9a129d8ea9952db616b4e9b904c4bdde56)
1*cf84ac9aSAndroid Build Coastguard Worker /**
2*cf84ac9aSAndroid Build Coastguard Worker  * Returns prefix for a syscall constant literal.  It is has to be that way
3*cf84ac9aSAndroid Build Coastguard Worker  * thanks to ARM that decided to prefix their special system calls like sys32
4*cf84ac9aSAndroid Build Coastguard Worker  * and sys26 with __ARM_NR_* prefix instead of __NR_*, so we can't simply print
5*cf84ac9aSAndroid Build Coastguard Worker  * "__NR_".
6*cf84ac9aSAndroid Build Coastguard Worker  */
7*cf84ac9aSAndroid Build Coastguard Worker static inline const char *
nr_prefix(kernel_ulong_t scno)8*cf84ac9aSAndroid Build Coastguard Worker nr_prefix(kernel_ulong_t scno)
9*cf84ac9aSAndroid Build Coastguard Worker {
10*cf84ac9aSAndroid Build Coastguard Worker 	return "__NR_";
11*cf84ac9aSAndroid Build Coastguard Worker }
12