linux_api/
syscall.rs

1use crate::bindings;
2
3/// Linux x86-64 syscall number.
4#[derive(Copy, Clone, PartialEq, Eq, Hash)]
5pub struct SyscallNum(u32);
6
7#[allow(non_upper_case_globals)]
8impl SyscallNum {
9    pub const NR_read: Self = Self::new(bindings::LINUX___NR_read);
10    pub const NR_write: Self = Self::new(bindings::LINUX___NR_write);
11    pub const NR_open: Self = Self::new(bindings::LINUX___NR_open);
12    pub const NR_close: Self = Self::new(bindings::LINUX___NR_close);
13    pub const NR_stat: Self = Self::new(bindings::LINUX___NR_stat);
14    pub const NR_fstat: Self = Self::new(bindings::LINUX___NR_fstat);
15    pub const NR_lstat: Self = Self::new(bindings::LINUX___NR_lstat);
16    pub const NR_poll: Self = Self::new(bindings::LINUX___NR_poll);
17    pub const NR_lseek: Self = Self::new(bindings::LINUX___NR_lseek);
18    pub const NR_mmap: Self = Self::new(bindings::LINUX___NR_mmap);
19    pub const NR_mprotect: Self = Self::new(bindings::LINUX___NR_mprotect);
20    pub const NR_munmap: Self = Self::new(bindings::LINUX___NR_munmap);
21    pub const NR_brk: Self = Self::new(bindings::LINUX___NR_brk);
22    pub const NR_rt_sigaction: Self = Self::new(bindings::LINUX___NR_rt_sigaction);
23    pub const NR_rt_sigprocmask: Self = Self::new(bindings::LINUX___NR_rt_sigprocmask);
24    pub const NR_rt_sigreturn: Self = Self::new(bindings::LINUX___NR_rt_sigreturn);
25    pub const NR_ioctl: Self = Self::new(bindings::LINUX___NR_ioctl);
26    pub const NR_pread64: Self = Self::new(bindings::LINUX___NR_pread64);
27    pub const NR_pwrite64: Self = Self::new(bindings::LINUX___NR_pwrite64);
28    pub const NR_readv: Self = Self::new(bindings::LINUX___NR_readv);
29    pub const NR_writev: Self = Self::new(bindings::LINUX___NR_writev);
30    pub const NR_access: Self = Self::new(bindings::LINUX___NR_access);
31    pub const NR_pipe: Self = Self::new(bindings::LINUX___NR_pipe);
32    pub const NR_select: Self = Self::new(bindings::LINUX___NR_select);
33    pub const NR_sched_yield: Self = Self::new(bindings::LINUX___NR_sched_yield);
34    pub const NR_mremap: Self = Self::new(bindings::LINUX___NR_mremap);
35    pub const NR_msync: Self = Self::new(bindings::LINUX___NR_msync);
36    pub const NR_mincore: Self = Self::new(bindings::LINUX___NR_mincore);
37    pub const NR_madvise: Self = Self::new(bindings::LINUX___NR_madvise);
38    pub const NR_shmget: Self = Self::new(bindings::LINUX___NR_shmget);
39    pub const NR_shmat: Self = Self::new(bindings::LINUX___NR_shmat);
40    pub const NR_shmctl: Self = Self::new(bindings::LINUX___NR_shmctl);
41    pub const NR_dup: Self = Self::new(bindings::LINUX___NR_dup);
42    pub const NR_dup2: Self = Self::new(bindings::LINUX___NR_dup2);
43    pub const NR_pause: Self = Self::new(bindings::LINUX___NR_pause);
44    pub const NR_nanosleep: Self = Self::new(bindings::LINUX___NR_nanosleep);
45    pub const NR_getitimer: Self = Self::new(bindings::LINUX___NR_getitimer);
46    pub const NR_alarm: Self = Self::new(bindings::LINUX___NR_alarm);
47    pub const NR_setitimer: Self = Self::new(bindings::LINUX___NR_setitimer);
48    pub const NR_getpid: Self = Self::new(bindings::LINUX___NR_getpid);
49    pub const NR_sendfile: Self = Self::new(bindings::LINUX___NR_sendfile);
50    pub const NR_socket: Self = Self::new(bindings::LINUX___NR_socket);
51    pub const NR_connect: Self = Self::new(bindings::LINUX___NR_connect);
52    pub const NR_accept: Self = Self::new(bindings::LINUX___NR_accept);
53    pub const NR_sendto: Self = Self::new(bindings::LINUX___NR_sendto);
54    pub const NR_recvfrom: Self = Self::new(bindings::LINUX___NR_recvfrom);
55    pub const NR_sendmsg: Self = Self::new(bindings::LINUX___NR_sendmsg);
56    pub const NR_recvmsg: Self = Self::new(bindings::LINUX___NR_recvmsg);
57    pub const NR_shutdown: Self = Self::new(bindings::LINUX___NR_shutdown);
58    pub const NR_bind: Self = Self::new(bindings::LINUX___NR_bind);
59    pub const NR_listen: Self = Self::new(bindings::LINUX___NR_listen);
60    pub const NR_getsockname: Self = Self::new(bindings::LINUX___NR_getsockname);
61    pub const NR_getpeername: Self = Self::new(bindings::LINUX___NR_getpeername);
62    pub const NR_socketpair: Self = Self::new(bindings::LINUX___NR_socketpair);
63    pub const NR_setsockopt: Self = Self::new(bindings::LINUX___NR_setsockopt);
64    pub const NR_getsockopt: Self = Self::new(bindings::LINUX___NR_getsockopt);
65    pub const NR_clone: Self = Self::new(bindings::LINUX___NR_clone);
66    pub const NR_fork: Self = Self::new(bindings::LINUX___NR_fork);
67    pub const NR_vfork: Self = Self::new(bindings::LINUX___NR_vfork);
68    pub const NR_execve: Self = Self::new(bindings::LINUX___NR_execve);
69    pub const NR_exit: Self = Self::new(bindings::LINUX___NR_exit);
70    pub const NR_wait4: Self = Self::new(bindings::LINUX___NR_wait4);
71    pub const NR_kill: Self = Self::new(bindings::LINUX___NR_kill);
72    pub const NR_uname: Self = Self::new(bindings::LINUX___NR_uname);
73    pub const NR_semget: Self = Self::new(bindings::LINUX___NR_semget);
74    pub const NR_semop: Self = Self::new(bindings::LINUX___NR_semop);
75    pub const NR_semctl: Self = Self::new(bindings::LINUX___NR_semctl);
76    pub const NR_shmdt: Self = Self::new(bindings::LINUX___NR_shmdt);
77    pub const NR_msgget: Self = Self::new(bindings::LINUX___NR_msgget);
78    pub const NR_msgsnd: Self = Self::new(bindings::LINUX___NR_msgsnd);
79    pub const NR_msgrcv: Self = Self::new(bindings::LINUX___NR_msgrcv);
80    pub const NR_msgctl: Self = Self::new(bindings::LINUX___NR_msgctl);
81    pub const NR_fcntl: Self = Self::new(bindings::LINUX___NR_fcntl);
82    pub const NR_flock: Self = Self::new(bindings::LINUX___NR_flock);
83    pub const NR_fsync: Self = Self::new(bindings::LINUX___NR_fsync);
84    pub const NR_fdatasync: Self = Self::new(bindings::LINUX___NR_fdatasync);
85    pub const NR_truncate: Self = Self::new(bindings::LINUX___NR_truncate);
86    pub const NR_ftruncate: Self = Self::new(bindings::LINUX___NR_ftruncate);
87    pub const NR_getdents: Self = Self::new(bindings::LINUX___NR_getdents);
88    pub const NR_getcwd: Self = Self::new(bindings::LINUX___NR_getcwd);
89    pub const NR_chdir: Self = Self::new(bindings::LINUX___NR_chdir);
90    pub const NR_fchdir: Self = Self::new(bindings::LINUX___NR_fchdir);
91    pub const NR_rename: Self = Self::new(bindings::LINUX___NR_rename);
92    pub const NR_mkdir: Self = Self::new(bindings::LINUX___NR_mkdir);
93    pub const NR_rmdir: Self = Self::new(bindings::LINUX___NR_rmdir);
94    pub const NR_creat: Self = Self::new(bindings::LINUX___NR_creat);
95    pub const NR_link: Self = Self::new(bindings::LINUX___NR_link);
96    pub const NR_unlink: Self = Self::new(bindings::LINUX___NR_unlink);
97    pub const NR_symlink: Self = Self::new(bindings::LINUX___NR_symlink);
98    pub const NR_readlink: Self = Self::new(bindings::LINUX___NR_readlink);
99    pub const NR_chmod: Self = Self::new(bindings::LINUX___NR_chmod);
100    pub const NR_fchmod: Self = Self::new(bindings::LINUX___NR_fchmod);
101    pub const NR_chown: Self = Self::new(bindings::LINUX___NR_chown);
102    pub const NR_fchown: Self = Self::new(bindings::LINUX___NR_fchown);
103    pub const NR_lchown: Self = Self::new(bindings::LINUX___NR_lchown);
104    pub const NR_umask: Self = Self::new(bindings::LINUX___NR_umask);
105    pub const NR_gettimeofday: Self = Self::new(bindings::LINUX___NR_gettimeofday);
106    pub const NR_getrlimit: Self = Self::new(bindings::LINUX___NR_getrlimit);
107    pub const NR_getrusage: Self = Self::new(bindings::LINUX___NR_getrusage);
108    pub const NR_sysinfo: Self = Self::new(bindings::LINUX___NR_sysinfo);
109    pub const NR_times: Self = Self::new(bindings::LINUX___NR_times);
110    pub const NR_ptrace: Self = Self::new(bindings::LINUX___NR_ptrace);
111    pub const NR_getuid: Self = Self::new(bindings::LINUX___NR_getuid);
112    pub const NR_syslog: Self = Self::new(bindings::LINUX___NR_syslog);
113    pub const NR_getgid: Self = Self::new(bindings::LINUX___NR_getgid);
114    pub const NR_setuid: Self = Self::new(bindings::LINUX___NR_setuid);
115    pub const NR_setgid: Self = Self::new(bindings::LINUX___NR_setgid);
116    pub const NR_geteuid: Self = Self::new(bindings::LINUX___NR_geteuid);
117    pub const NR_getegid: Self = Self::new(bindings::LINUX___NR_getegid);
118    pub const NR_setpgid: Self = Self::new(bindings::LINUX___NR_setpgid);
119    pub const NR_getppid: Self = Self::new(bindings::LINUX___NR_getppid);
120    pub const NR_getpgrp: Self = Self::new(bindings::LINUX___NR_getpgrp);
121    pub const NR_setsid: Self = Self::new(bindings::LINUX___NR_setsid);
122    pub const NR_setreuid: Self = Self::new(bindings::LINUX___NR_setreuid);
123    pub const NR_setregid: Self = Self::new(bindings::LINUX___NR_setregid);
124    pub const NR_getgroups: Self = Self::new(bindings::LINUX___NR_getgroups);
125    pub const NR_setgroups: Self = Self::new(bindings::LINUX___NR_setgroups);
126    pub const NR_setresuid: Self = Self::new(bindings::LINUX___NR_setresuid);
127    pub const NR_getresuid: Self = Self::new(bindings::LINUX___NR_getresuid);
128    pub const NR_setresgid: Self = Self::new(bindings::LINUX___NR_setresgid);
129    pub const NR_getresgid: Self = Self::new(bindings::LINUX___NR_getresgid);
130    pub const NR_getpgid: Self = Self::new(bindings::LINUX___NR_getpgid);
131    pub const NR_setfsuid: Self = Self::new(bindings::LINUX___NR_setfsuid);
132    pub const NR_setfsgid: Self = Self::new(bindings::LINUX___NR_setfsgid);
133    pub const NR_getsid: Self = Self::new(bindings::LINUX___NR_getsid);
134    pub const NR_capget: Self = Self::new(bindings::LINUX___NR_capget);
135    pub const NR_capset: Self = Self::new(bindings::LINUX___NR_capset);
136    pub const NR_rt_sigpending: Self = Self::new(bindings::LINUX___NR_rt_sigpending);
137    pub const NR_rt_sigtimedwait: Self = Self::new(bindings::LINUX___NR_rt_sigtimedwait);
138    pub const NR_rt_sigqueueinfo: Self = Self::new(bindings::LINUX___NR_rt_sigqueueinfo);
139    pub const NR_rt_sigsuspend: Self = Self::new(bindings::LINUX___NR_rt_sigsuspend);
140    pub const NR_sigaltstack: Self = Self::new(bindings::LINUX___NR_sigaltstack);
141    pub const NR_utime: Self = Self::new(bindings::LINUX___NR_utime);
142    pub const NR_mknod: Self = Self::new(bindings::LINUX___NR_mknod);
143    pub const NR_uselib: Self = Self::new(bindings::LINUX___NR_uselib);
144    pub const NR_personality: Self = Self::new(bindings::LINUX___NR_personality);
145    pub const NR_ustat: Self = Self::new(bindings::LINUX___NR_ustat);
146    pub const NR_statfs: Self = Self::new(bindings::LINUX___NR_statfs);
147    pub const NR_fstatfs: Self = Self::new(bindings::LINUX___NR_fstatfs);
148    pub const NR_sysfs: Self = Self::new(bindings::LINUX___NR_sysfs);
149    pub const NR_getpriority: Self = Self::new(bindings::LINUX___NR_getpriority);
150    pub const NR_setpriority: Self = Self::new(bindings::LINUX___NR_setpriority);
151    pub const NR_sched_setparam: Self = Self::new(bindings::LINUX___NR_sched_setparam);
152    pub const NR_sched_getparam: Self = Self::new(bindings::LINUX___NR_sched_getparam);
153    pub const NR_sched_setscheduler: Self = Self::new(bindings::LINUX___NR_sched_setscheduler);
154    pub const NR_sched_getscheduler: Self = Self::new(bindings::LINUX___NR_sched_getscheduler);
155    pub const NR_sched_get_priority_max: Self =
156        Self::new(bindings::LINUX___NR_sched_get_priority_max);
157    pub const NR_sched_get_priority_min: Self =
158        Self::new(bindings::LINUX___NR_sched_get_priority_min);
159    pub const NR_sched_rr_get_interval: Self =
160        Self::new(bindings::LINUX___NR_sched_rr_get_interval);
161    pub const NR_mlock: Self = Self::new(bindings::LINUX___NR_mlock);
162    pub const NR_munlock: Self = Self::new(bindings::LINUX___NR_munlock);
163    pub const NR_mlockall: Self = Self::new(bindings::LINUX___NR_mlockall);
164    pub const NR_munlockall: Self = Self::new(bindings::LINUX___NR_munlockall);
165    pub const NR_vhangup: Self = Self::new(bindings::LINUX___NR_vhangup);
166    pub const NR_modify_ldt: Self = Self::new(bindings::LINUX___NR_modify_ldt);
167    pub const NR_pivot_root: Self = Self::new(bindings::LINUX___NR_pivot_root);
168    pub const NR__sysctl: Self = Self::new(bindings::LINUX___NR__sysctl);
169    pub const NR_prctl: Self = Self::new(bindings::LINUX___NR_prctl);
170    pub const NR_arch_prctl: Self = Self::new(bindings::LINUX___NR_arch_prctl);
171    pub const NR_adjtimex: Self = Self::new(bindings::LINUX___NR_adjtimex);
172    pub const NR_setrlimit: Self = Self::new(bindings::LINUX___NR_setrlimit);
173    pub const NR_chroot: Self = Self::new(bindings::LINUX___NR_chroot);
174    pub const NR_sync: Self = Self::new(bindings::LINUX___NR_sync);
175    pub const NR_acct: Self = Self::new(bindings::LINUX___NR_acct);
176    pub const NR_settimeofday: Self = Self::new(bindings::LINUX___NR_settimeofday);
177    pub const NR_mount: Self = Self::new(bindings::LINUX___NR_mount);
178    pub const NR_umount2: Self = Self::new(bindings::LINUX___NR_umount2);
179    pub const NR_swapon: Self = Self::new(bindings::LINUX___NR_swapon);
180    pub const NR_swapoff: Self = Self::new(bindings::LINUX___NR_swapoff);
181    pub const NR_reboot: Self = Self::new(bindings::LINUX___NR_reboot);
182    pub const NR_sethostname: Self = Self::new(bindings::LINUX___NR_sethostname);
183    pub const NR_setdomainname: Self = Self::new(bindings::LINUX___NR_setdomainname);
184    pub const NR_iopl: Self = Self::new(bindings::LINUX___NR_iopl);
185    pub const NR_ioperm: Self = Self::new(bindings::LINUX___NR_ioperm);
186    pub const NR_create_module: Self = Self::new(bindings::LINUX___NR_create_module);
187    pub const NR_init_module: Self = Self::new(bindings::LINUX___NR_init_module);
188    pub const NR_delete_module: Self = Self::new(bindings::LINUX___NR_delete_module);
189    pub const NR_get_kernel_syms: Self = Self::new(bindings::LINUX___NR_get_kernel_syms);
190    pub const NR_query_module: Self = Self::new(bindings::LINUX___NR_query_module);
191    pub const NR_quotactl: Self = Self::new(bindings::LINUX___NR_quotactl);
192    pub const NR_nfsservctl: Self = Self::new(bindings::LINUX___NR_nfsservctl);
193    pub const NR_getpmsg: Self = Self::new(bindings::LINUX___NR_getpmsg);
194    pub const NR_putpmsg: Self = Self::new(bindings::LINUX___NR_putpmsg);
195    pub const NR_afs_syscall: Self = Self::new(bindings::LINUX___NR_afs_syscall);
196    pub const NR_tuxcall: Self = Self::new(bindings::LINUX___NR_tuxcall);
197    pub const NR_security: Self = Self::new(bindings::LINUX___NR_security);
198    pub const NR_gettid: Self = Self::new(bindings::LINUX___NR_gettid);
199    pub const NR_readahead: Self = Self::new(bindings::LINUX___NR_readahead);
200    pub const NR_setxattr: Self = Self::new(bindings::LINUX___NR_setxattr);
201    pub const NR_lsetxattr: Self = Self::new(bindings::LINUX___NR_lsetxattr);
202    pub const NR_fsetxattr: Self = Self::new(bindings::LINUX___NR_fsetxattr);
203    pub const NR_getxattr: Self = Self::new(bindings::LINUX___NR_getxattr);
204    pub const NR_lgetxattr: Self = Self::new(bindings::LINUX___NR_lgetxattr);
205    pub const NR_fgetxattr: Self = Self::new(bindings::LINUX___NR_fgetxattr);
206    pub const NR_listxattr: Self = Self::new(bindings::LINUX___NR_listxattr);
207    pub const NR_llistxattr: Self = Self::new(bindings::LINUX___NR_llistxattr);
208    pub const NR_flistxattr: Self = Self::new(bindings::LINUX___NR_flistxattr);
209    pub const NR_removexattr: Self = Self::new(bindings::LINUX___NR_removexattr);
210    pub const NR_lremovexattr: Self = Self::new(bindings::LINUX___NR_lremovexattr);
211    pub const NR_fremovexattr: Self = Self::new(bindings::LINUX___NR_fremovexattr);
212    pub const NR_tkill: Self = Self::new(bindings::LINUX___NR_tkill);
213    pub const NR_time: Self = Self::new(bindings::LINUX___NR_time);
214    pub const NR_futex: Self = Self::new(bindings::LINUX___NR_futex);
215    pub const NR_sched_setaffinity: Self = Self::new(bindings::LINUX___NR_sched_setaffinity);
216    pub const NR_sched_getaffinity: Self = Self::new(bindings::LINUX___NR_sched_getaffinity);
217    pub const NR_set_thread_area: Self = Self::new(bindings::LINUX___NR_set_thread_area);
218    pub const NR_io_setup: Self = Self::new(bindings::LINUX___NR_io_setup);
219    pub const NR_io_destroy: Self = Self::new(bindings::LINUX___NR_io_destroy);
220    pub const NR_io_getevents: Self = Self::new(bindings::LINUX___NR_io_getevents);
221    pub const NR_io_submit: Self = Self::new(bindings::LINUX___NR_io_submit);
222    pub const NR_io_cancel: Self = Self::new(bindings::LINUX___NR_io_cancel);
223    pub const NR_get_thread_area: Self = Self::new(bindings::LINUX___NR_get_thread_area);
224    pub const NR_lookup_dcookie: Self = Self::new(bindings::LINUX___NR_lookup_dcookie);
225    pub const NR_epoll_create: Self = Self::new(bindings::LINUX___NR_epoll_create);
226    pub const NR_epoll_ctl_old: Self = Self::new(bindings::LINUX___NR_epoll_ctl_old);
227    pub const NR_epoll_wait_old: Self = Self::new(bindings::LINUX___NR_epoll_wait_old);
228    pub const NR_remap_file_pages: Self = Self::new(bindings::LINUX___NR_remap_file_pages);
229    pub const NR_getdents64: Self = Self::new(bindings::LINUX___NR_getdents64);
230    pub const NR_set_tid_address: Self = Self::new(bindings::LINUX___NR_set_tid_address);
231    pub const NR_restart_syscall: Self = Self::new(bindings::LINUX___NR_restart_syscall);
232    pub const NR_semtimedop: Self = Self::new(bindings::LINUX___NR_semtimedop);
233    pub const NR_fadvise64: Self = Self::new(bindings::LINUX___NR_fadvise64);
234    pub const NR_timer_create: Self = Self::new(bindings::LINUX___NR_timer_create);
235    pub const NR_timer_settime: Self = Self::new(bindings::LINUX___NR_timer_settime);
236    pub const NR_timer_gettime: Self = Self::new(bindings::LINUX___NR_timer_gettime);
237    pub const NR_timer_getoverrun: Self = Self::new(bindings::LINUX___NR_timer_getoverrun);
238    pub const NR_timer_delete: Self = Self::new(bindings::LINUX___NR_timer_delete);
239    pub const NR_clock_settime: Self = Self::new(bindings::LINUX___NR_clock_settime);
240    pub const NR_clock_gettime: Self = Self::new(bindings::LINUX___NR_clock_gettime);
241    pub const NR_clock_getres: Self = Self::new(bindings::LINUX___NR_clock_getres);
242    pub const NR_clock_nanosleep: Self = Self::new(bindings::LINUX___NR_clock_nanosleep);
243    pub const NR_exit_group: Self = Self::new(bindings::LINUX___NR_exit_group);
244    pub const NR_epoll_wait: Self = Self::new(bindings::LINUX___NR_epoll_wait);
245    pub const NR_epoll_ctl: Self = Self::new(bindings::LINUX___NR_epoll_ctl);
246    pub const NR_tgkill: Self = Self::new(bindings::LINUX___NR_tgkill);
247    pub const NR_utimes: Self = Self::new(bindings::LINUX___NR_utimes);
248    pub const NR_vserver: Self = Self::new(bindings::LINUX___NR_vserver);
249    pub const NR_mbind: Self = Self::new(bindings::LINUX___NR_mbind);
250    pub const NR_set_mempolicy: Self = Self::new(bindings::LINUX___NR_set_mempolicy);
251    pub const NR_get_mempolicy: Self = Self::new(bindings::LINUX___NR_get_mempolicy);
252    pub const NR_mq_open: Self = Self::new(bindings::LINUX___NR_mq_open);
253    pub const NR_mq_unlink: Self = Self::new(bindings::LINUX___NR_mq_unlink);
254    pub const NR_mq_timedsend: Self = Self::new(bindings::LINUX___NR_mq_timedsend);
255    pub const NR_mq_timedreceive: Self = Self::new(bindings::LINUX___NR_mq_timedreceive);
256    pub const NR_mq_notify: Self = Self::new(bindings::LINUX___NR_mq_notify);
257    pub const NR_mq_getsetattr: Self = Self::new(bindings::LINUX___NR_mq_getsetattr);
258    pub const NR_kexec_load: Self = Self::new(bindings::LINUX___NR_kexec_load);
259    pub const NR_waitid: Self = Self::new(bindings::LINUX___NR_waitid);
260    pub const NR_add_key: Self = Self::new(bindings::LINUX___NR_add_key);
261    pub const NR_request_key: Self = Self::new(bindings::LINUX___NR_request_key);
262    pub const NR_keyctl: Self = Self::new(bindings::LINUX___NR_keyctl);
263    pub const NR_ioprio_set: Self = Self::new(bindings::LINUX___NR_ioprio_set);
264    pub const NR_ioprio_get: Self = Self::new(bindings::LINUX___NR_ioprio_get);
265    pub const NR_inotify_init: Self = Self::new(bindings::LINUX___NR_inotify_init);
266    pub const NR_inotify_add_watch: Self = Self::new(bindings::LINUX___NR_inotify_add_watch);
267    pub const NR_inotify_rm_watch: Self = Self::new(bindings::LINUX___NR_inotify_rm_watch);
268    pub const NR_migrate_pages: Self = Self::new(bindings::LINUX___NR_migrate_pages);
269    pub const NR_openat: Self = Self::new(bindings::LINUX___NR_openat);
270    pub const NR_mkdirat: Self = Self::new(bindings::LINUX___NR_mkdirat);
271    pub const NR_mknodat: Self = Self::new(bindings::LINUX___NR_mknodat);
272    pub const NR_fchownat: Self = Self::new(bindings::LINUX___NR_fchownat);
273    pub const NR_futimesat: Self = Self::new(bindings::LINUX___NR_futimesat);
274    pub const NR_newfstatat: Self = Self::new(bindings::LINUX___NR_newfstatat);
275    pub const NR_unlinkat: Self = Self::new(bindings::LINUX___NR_unlinkat);
276    pub const NR_renameat: Self = Self::new(bindings::LINUX___NR_renameat);
277    pub const NR_linkat: Self = Self::new(bindings::LINUX___NR_linkat);
278    pub const NR_symlinkat: Self = Self::new(bindings::LINUX___NR_symlinkat);
279    pub const NR_readlinkat: Self = Self::new(bindings::LINUX___NR_readlinkat);
280    pub const NR_fchmodat: Self = Self::new(bindings::LINUX___NR_fchmodat);
281    pub const NR_faccessat: Self = Self::new(bindings::LINUX___NR_faccessat);
282    pub const NR_pselect6: Self = Self::new(bindings::LINUX___NR_pselect6);
283    pub const NR_ppoll: Self = Self::new(bindings::LINUX___NR_ppoll);
284    pub const NR_unshare: Self = Self::new(bindings::LINUX___NR_unshare);
285    pub const NR_set_robust_list: Self = Self::new(bindings::LINUX___NR_set_robust_list);
286    pub const NR_get_robust_list: Self = Self::new(bindings::LINUX___NR_get_robust_list);
287    pub const NR_splice: Self = Self::new(bindings::LINUX___NR_splice);
288    pub const NR_tee: Self = Self::new(bindings::LINUX___NR_tee);
289    pub const NR_sync_file_range: Self = Self::new(bindings::LINUX___NR_sync_file_range);
290    pub const NR_vmsplice: Self = Self::new(bindings::LINUX___NR_vmsplice);
291    pub const NR_move_pages: Self = Self::new(bindings::LINUX___NR_move_pages);
292    pub const NR_utimensat: Self = Self::new(bindings::LINUX___NR_utimensat);
293    pub const NR_epoll_pwait: Self = Self::new(bindings::LINUX___NR_epoll_pwait);
294    pub const NR_signalfd: Self = Self::new(bindings::LINUX___NR_signalfd);
295    pub const NR_timerfd_create: Self = Self::new(bindings::LINUX___NR_timerfd_create);
296    pub const NR_eventfd: Self = Self::new(bindings::LINUX___NR_eventfd);
297    pub const NR_fallocate: Self = Self::new(bindings::LINUX___NR_fallocate);
298    pub const NR_timerfd_settime: Self = Self::new(bindings::LINUX___NR_timerfd_settime);
299    pub const NR_timerfd_gettime: Self = Self::new(bindings::LINUX___NR_timerfd_gettime);
300    pub const NR_accept4: Self = Self::new(bindings::LINUX___NR_accept4);
301    pub const NR_signalfd4: Self = Self::new(bindings::LINUX___NR_signalfd4);
302    pub const NR_eventfd2: Self = Self::new(bindings::LINUX___NR_eventfd2);
303    pub const NR_epoll_create1: Self = Self::new(bindings::LINUX___NR_epoll_create1);
304    pub const NR_dup3: Self = Self::new(bindings::LINUX___NR_dup3);
305    pub const NR_pipe2: Self = Self::new(bindings::LINUX___NR_pipe2);
306    pub const NR_inotify_init1: Self = Self::new(bindings::LINUX___NR_inotify_init1);
307    pub const NR_preadv: Self = Self::new(bindings::LINUX___NR_preadv);
308    pub const NR_pwritev: Self = Self::new(bindings::LINUX___NR_pwritev);
309    pub const NR_rt_tgsigqueueinfo: Self = Self::new(bindings::LINUX___NR_rt_tgsigqueueinfo);
310    pub const NR_perf_event_open: Self = Self::new(bindings::LINUX___NR_perf_event_open);
311    pub const NR_recvmmsg: Self = Self::new(bindings::LINUX___NR_recvmmsg);
312    pub const NR_fanotify_init: Self = Self::new(bindings::LINUX___NR_fanotify_init);
313    pub const NR_fanotify_mark: Self = Self::new(bindings::LINUX___NR_fanotify_mark);
314    pub const NR_prlimit64: Self = Self::new(bindings::LINUX___NR_prlimit64);
315    pub const NR_name_to_handle_at: Self = Self::new(bindings::LINUX___NR_name_to_handle_at);
316    pub const NR_open_by_handle_at: Self = Self::new(bindings::LINUX___NR_open_by_handle_at);
317    pub const NR_clock_adjtime: Self = Self::new(bindings::LINUX___NR_clock_adjtime);
318    pub const NR_syncfs: Self = Self::new(bindings::LINUX___NR_syncfs);
319    pub const NR_sendmmsg: Self = Self::new(bindings::LINUX___NR_sendmmsg);
320    pub const NR_setns: Self = Self::new(bindings::LINUX___NR_setns);
321    pub const NR_getcpu: Self = Self::new(bindings::LINUX___NR_getcpu);
322    pub const NR_process_vm_readv: Self = Self::new(bindings::LINUX___NR_process_vm_readv);
323    pub const NR_process_vm_writev: Self = Self::new(bindings::LINUX___NR_process_vm_writev);
324    pub const NR_kcmp: Self = Self::new(bindings::LINUX___NR_kcmp);
325    pub const NR_finit_module: Self = Self::new(bindings::LINUX___NR_finit_module);
326    pub const NR_sched_setattr: Self = Self::new(bindings::LINUX___NR_sched_setattr);
327    pub const NR_sched_getattr: Self = Self::new(bindings::LINUX___NR_sched_getattr);
328    pub const NR_renameat2: Self = Self::new(bindings::LINUX___NR_renameat2);
329    pub const NR_seccomp: Self = Self::new(bindings::LINUX___NR_seccomp);
330    pub const NR_getrandom: Self = Self::new(bindings::LINUX___NR_getrandom);
331    pub const NR_memfd_create: Self = Self::new(bindings::LINUX___NR_memfd_create);
332    pub const NR_kexec_file_load: Self = Self::new(bindings::LINUX___NR_kexec_file_load);
333    pub const NR_bpf: Self = Self::new(bindings::LINUX___NR_bpf);
334    pub const NR_execveat: Self = Self::new(bindings::LINUX___NR_execveat);
335    pub const NR_userfaultfd: Self = Self::new(bindings::LINUX___NR_userfaultfd);
336    pub const NR_membarrier: Self = Self::new(bindings::LINUX___NR_membarrier);
337    pub const NR_mlock2: Self = Self::new(bindings::LINUX___NR_mlock2);
338    pub const NR_copy_file_range: Self = Self::new(bindings::LINUX___NR_copy_file_range);
339    pub const NR_preadv2: Self = Self::new(bindings::LINUX___NR_preadv2);
340    pub const NR_pwritev2: Self = Self::new(bindings::LINUX___NR_pwritev2);
341    pub const NR_pkey_mprotect: Self = Self::new(bindings::LINUX___NR_pkey_mprotect);
342    pub const NR_pkey_alloc: Self = Self::new(bindings::LINUX___NR_pkey_alloc);
343    pub const NR_pkey_free: Self = Self::new(bindings::LINUX___NR_pkey_free);
344    pub const NR_statx: Self = Self::new(bindings::LINUX___NR_statx);
345    pub const NR_io_pgetevents: Self = Self::new(bindings::LINUX___NR_io_pgetevents);
346    pub const NR_rseq: Self = Self::new(bindings::LINUX___NR_rseq);
347    pub const NR_uretprobe: Self = Self::new(bindings::LINUX___NR_uretprobe);
348    pub const NR_pidfd_send_signal: Self = Self::new(bindings::LINUX___NR_pidfd_send_signal);
349    pub const NR_io_uring_setup: Self = Self::new(bindings::LINUX___NR_io_uring_setup);
350    pub const NR_io_uring_enter: Self = Self::new(bindings::LINUX___NR_io_uring_enter);
351    pub const NR_io_uring_register: Self = Self::new(bindings::LINUX___NR_io_uring_register);
352    pub const NR_open_tree: Self = Self::new(bindings::LINUX___NR_open_tree);
353    pub const NR_move_mount: Self = Self::new(bindings::LINUX___NR_move_mount);
354    pub const NR_fsopen: Self = Self::new(bindings::LINUX___NR_fsopen);
355    pub const NR_fsconfig: Self = Self::new(bindings::LINUX___NR_fsconfig);
356    pub const NR_fsmount: Self = Self::new(bindings::LINUX___NR_fsmount);
357    pub const NR_fspick: Self = Self::new(bindings::LINUX___NR_fspick);
358    pub const NR_pidfd_open: Self = Self::new(bindings::LINUX___NR_pidfd_open);
359    pub const NR_clone3: Self = Self::new(bindings::LINUX___NR_clone3);
360    pub const NR_close_range: Self = Self::new(bindings::LINUX___NR_close_range);
361    pub const NR_openat2: Self = Self::new(bindings::LINUX___NR_openat2);
362    pub const NR_pidfd_getfd: Self = Self::new(bindings::LINUX___NR_pidfd_getfd);
363    pub const NR_faccessat2: Self = Self::new(bindings::LINUX___NR_faccessat2);
364    pub const NR_process_madvise: Self = Self::new(bindings::LINUX___NR_process_madvise);
365    pub const NR_epoll_pwait2: Self = Self::new(bindings::LINUX___NR_epoll_pwait2);
366    pub const NR_mount_setattr: Self = Self::new(bindings::LINUX___NR_mount_setattr);
367    pub const NR_quotactl_fd: Self = Self::new(bindings::LINUX___NR_quotactl_fd);
368    pub const NR_landlock_create_ruleset: Self =
369        Self::new(bindings::LINUX___NR_landlock_create_ruleset);
370    pub const NR_landlock_add_rule: Self = Self::new(bindings::LINUX___NR_landlock_add_rule);
371    pub const NR_landlock_restrict_self: Self =
372        Self::new(bindings::LINUX___NR_landlock_restrict_self);
373    pub const NR_memfd_secret: Self = Self::new(bindings::LINUX___NR_memfd_secret);
374    pub const NR_process_mrelease: Self = Self::new(bindings::LINUX___NR_process_mrelease);
375    pub const NR_futex_waitv: Self = Self::new(bindings::LINUX___NR_futex_waitv);
376    pub const NR_set_mempolicy_home_node: Self =
377        Self::new(bindings::LINUX___NR_set_mempolicy_home_node);
378    pub const NR_cachestat: Self = Self::new(bindings::LINUX___NR_cachestat);
379    pub const NR_fchmodat2: Self = Self::new(bindings::LINUX___NR_fchmodat2);
380    pub const NR_map_shadow_stack: Self = Self::new(bindings::LINUX___NR_map_shadow_stack);
381    pub const NR_futex_wake: Self = Self::new(bindings::LINUX___NR_futex_wake);
382    pub const NR_futex_wait: Self = Self::new(bindings::LINUX___NR_futex_wait);
383    pub const NR_futex_requeue: Self = Self::new(bindings::LINUX___NR_futex_requeue);
384    pub const NR_statmount: Self = Self::new(bindings::LINUX___NR_statmount);
385    pub const NR_listmount: Self = Self::new(bindings::LINUX___NR_listmount);
386    pub const NR_lsm_get_self_attr: Self = Self::new(bindings::LINUX___NR_lsm_get_self_attr);
387    pub const NR_lsm_set_self_attr: Self = Self::new(bindings::LINUX___NR_lsm_set_self_attr);
388    pub const NR_lsm_list_modules: Self = Self::new(bindings::LINUX___NR_lsm_list_modules);
389    pub const NR_mseal: Self = Self::new(bindings::LINUX___NR_mseal);
390    // NOTE: add new entries to `to_str` below
391
392    pub const fn new(val: u32) -> Self {
393        Self(val)
394    }
395
396    pub const fn val(&self) -> u32 {
397        self.0
398    }
399
400    pub const fn to_str(&self) -> Option<&'static str> {
401        Some(match *self {
402            Self::NR_read => "read",
403            Self::NR_write => "write",
404            Self::NR_open => "open",
405            Self::NR_close => "close",
406            Self::NR_stat => "stat",
407            Self::NR_fstat => "fstat",
408            Self::NR_lstat => "lstat",
409            Self::NR_poll => "poll",
410            Self::NR_lseek => "lseek",
411            Self::NR_mmap => "mmap",
412            Self::NR_mprotect => "mprotect",
413            Self::NR_munmap => "munmap",
414            Self::NR_brk => "brk",
415            Self::NR_rt_sigaction => "rt_sigaction",
416            Self::NR_rt_sigprocmask => "rt_sigprocmask",
417            Self::NR_rt_sigreturn => "rt_sigreturn",
418            Self::NR_ioctl => "ioctl",
419            Self::NR_pread64 => "pread64",
420            Self::NR_pwrite64 => "pwrite64",
421            Self::NR_readv => "readv",
422            Self::NR_writev => "writev",
423            Self::NR_access => "access",
424            Self::NR_pipe => "pipe",
425            Self::NR_select => "select",
426            Self::NR_sched_yield => "sched_yield",
427            Self::NR_mremap => "mremap",
428            Self::NR_msync => "msync",
429            Self::NR_mincore => "mincore",
430            Self::NR_madvise => "madvise",
431            Self::NR_shmget => "shmget",
432            Self::NR_shmat => "shmat",
433            Self::NR_shmctl => "shmctl",
434            Self::NR_dup => "dup",
435            Self::NR_dup2 => "dup2",
436            Self::NR_pause => "pause",
437            Self::NR_nanosleep => "nanosleep",
438            Self::NR_getitimer => "getitimer",
439            Self::NR_alarm => "alarm",
440            Self::NR_setitimer => "setitimer",
441            Self::NR_getpid => "getpid",
442            Self::NR_sendfile => "sendfile",
443            Self::NR_socket => "socket",
444            Self::NR_connect => "connect",
445            Self::NR_accept => "accept",
446            Self::NR_sendto => "sendto",
447            Self::NR_recvfrom => "recvfrom",
448            Self::NR_sendmsg => "sendmsg",
449            Self::NR_recvmsg => "recvmsg",
450            Self::NR_shutdown => "shutdown",
451            Self::NR_bind => "bind",
452            Self::NR_listen => "listen",
453            Self::NR_getsockname => "getsockname",
454            Self::NR_getpeername => "getpeername",
455            Self::NR_socketpair => "socketpair",
456            Self::NR_setsockopt => "setsockopt",
457            Self::NR_getsockopt => "getsockopt",
458            Self::NR_clone => "clone",
459            Self::NR_fork => "fork",
460            Self::NR_vfork => "vfork",
461            Self::NR_execve => "execve",
462            Self::NR_exit => "exit",
463            Self::NR_wait4 => "wait4",
464            Self::NR_kill => "kill",
465            Self::NR_uname => "uname",
466            Self::NR_semget => "semget",
467            Self::NR_semop => "semop",
468            Self::NR_semctl => "semctl",
469            Self::NR_shmdt => "shmdt",
470            Self::NR_msgget => "msgget",
471            Self::NR_msgsnd => "msgsnd",
472            Self::NR_msgrcv => "msgrcv",
473            Self::NR_msgctl => "msgctl",
474            Self::NR_fcntl => "fcntl",
475            Self::NR_flock => "flock",
476            Self::NR_fsync => "fsync",
477            Self::NR_fdatasync => "fdatasync",
478            Self::NR_truncate => "truncate",
479            Self::NR_ftruncate => "ftruncate",
480            Self::NR_getdents => "getdents",
481            Self::NR_getcwd => "getcwd",
482            Self::NR_chdir => "chdir",
483            Self::NR_fchdir => "fchdir",
484            Self::NR_rename => "rename",
485            Self::NR_mkdir => "mkdir",
486            Self::NR_rmdir => "rmdir",
487            Self::NR_creat => "creat",
488            Self::NR_link => "link",
489            Self::NR_unlink => "unlink",
490            Self::NR_symlink => "symlink",
491            Self::NR_readlink => "readlink",
492            Self::NR_chmod => "chmod",
493            Self::NR_fchmod => "fchmod",
494            Self::NR_chown => "chown",
495            Self::NR_fchown => "fchown",
496            Self::NR_lchown => "lchown",
497            Self::NR_umask => "umask",
498            Self::NR_gettimeofday => "gettimeofday",
499            Self::NR_getrlimit => "getrlimit",
500            Self::NR_getrusage => "getrusage",
501            Self::NR_sysinfo => "sysinfo",
502            Self::NR_times => "times",
503            Self::NR_ptrace => "ptrace",
504            Self::NR_getuid => "getuid",
505            Self::NR_syslog => "syslog",
506            Self::NR_getgid => "getgid",
507            Self::NR_setuid => "setuid",
508            Self::NR_setgid => "setgid",
509            Self::NR_geteuid => "geteuid",
510            Self::NR_getegid => "getegid",
511            Self::NR_setpgid => "setpgid",
512            Self::NR_getppid => "getppid",
513            Self::NR_getpgrp => "getpgrp",
514            Self::NR_setsid => "setsid",
515            Self::NR_setreuid => "setreuid",
516            Self::NR_setregid => "setregid",
517            Self::NR_getgroups => "getgroups",
518            Self::NR_setgroups => "setgroups",
519            Self::NR_setresuid => "setresuid",
520            Self::NR_getresuid => "getresuid",
521            Self::NR_setresgid => "setresgid",
522            Self::NR_getresgid => "getresgid",
523            Self::NR_getpgid => "getpgid",
524            Self::NR_setfsuid => "setfsuid",
525            Self::NR_setfsgid => "setfsgid",
526            Self::NR_getsid => "getsid",
527            Self::NR_capget => "capget",
528            Self::NR_capset => "capset",
529            Self::NR_rt_sigpending => "rt_sigpending",
530            Self::NR_rt_sigtimedwait => "rt_sigtimedwait",
531            Self::NR_rt_sigqueueinfo => "rt_sigqueueinfo",
532            Self::NR_rt_sigsuspend => "rt_sigsuspend",
533            Self::NR_sigaltstack => "sigaltstack",
534            Self::NR_utime => "utime",
535            Self::NR_mknod => "mknod",
536            Self::NR_uselib => "uselib",
537            Self::NR_personality => "personality",
538            Self::NR_ustat => "ustat",
539            Self::NR_statfs => "statfs",
540            Self::NR_fstatfs => "fstatfs",
541            Self::NR_sysfs => "sysfs",
542            Self::NR_getpriority => "getpriority",
543            Self::NR_setpriority => "setpriority",
544            Self::NR_sched_setparam => "sched_setparam",
545            Self::NR_sched_getparam => "sched_getparam",
546            Self::NR_sched_setscheduler => "sched_setscheduler",
547            Self::NR_sched_getscheduler => "sched_getscheduler",
548            Self::NR_sched_get_priority_max => "sched_get_priority_max",
549            Self::NR_sched_get_priority_min => "sched_get_priority_min",
550            Self::NR_sched_rr_get_interval => "sched_rr_get_interval",
551            Self::NR_mlock => "mlock",
552            Self::NR_munlock => "munlock",
553            Self::NR_mlockall => "mlockall",
554            Self::NR_munlockall => "munlockall",
555            Self::NR_vhangup => "vhangup",
556            Self::NR_modify_ldt => "modify_ldt",
557            Self::NR_pivot_root => "pivot_root",
558            Self::NR__sysctl => "_sysctl",
559            Self::NR_prctl => "prctl",
560            Self::NR_arch_prctl => "arch_prctl",
561            Self::NR_adjtimex => "adjtimex",
562            Self::NR_setrlimit => "setrlimit",
563            Self::NR_chroot => "chroot",
564            Self::NR_sync => "sync",
565            Self::NR_acct => "acct",
566            Self::NR_settimeofday => "settimeofday",
567            Self::NR_mount => "mount",
568            Self::NR_umount2 => "umount2",
569            Self::NR_swapon => "swapon",
570            Self::NR_swapoff => "swapoff",
571            Self::NR_reboot => "reboot",
572            Self::NR_sethostname => "sethostname",
573            Self::NR_setdomainname => "setdomainname",
574            Self::NR_iopl => "iopl",
575            Self::NR_ioperm => "ioperm",
576            Self::NR_create_module => "create_module",
577            Self::NR_init_module => "init_module",
578            Self::NR_delete_module => "delete_module",
579            Self::NR_get_kernel_syms => "get_kernel_syms",
580            Self::NR_query_module => "query_module",
581            Self::NR_quotactl => "quotactl",
582            Self::NR_nfsservctl => "nfsservctl",
583            Self::NR_getpmsg => "getpmsg",
584            Self::NR_putpmsg => "putpmsg",
585            Self::NR_afs_syscall => "afs_syscall",
586            Self::NR_tuxcall => "tuxcall",
587            Self::NR_security => "security",
588            Self::NR_gettid => "gettid",
589            Self::NR_readahead => "readahead",
590            Self::NR_setxattr => "setxattr",
591            Self::NR_lsetxattr => "lsetxattr",
592            Self::NR_fsetxattr => "fsetxattr",
593            Self::NR_getxattr => "getxattr",
594            Self::NR_lgetxattr => "lgetxattr",
595            Self::NR_fgetxattr => "fgetxattr",
596            Self::NR_listxattr => "listxattr",
597            Self::NR_llistxattr => "llistxattr",
598            Self::NR_flistxattr => "flistxattr",
599            Self::NR_removexattr => "removexattr",
600            Self::NR_lremovexattr => "lremovexattr",
601            Self::NR_fremovexattr => "fremovexattr",
602            Self::NR_tkill => "tkill",
603            Self::NR_time => "time",
604            Self::NR_futex => "futex",
605            Self::NR_sched_setaffinity => "sched_setaffinity",
606            Self::NR_sched_getaffinity => "sched_getaffinity",
607            Self::NR_set_thread_area => "set_thread_area",
608            Self::NR_io_setup => "io_setup",
609            Self::NR_io_destroy => "io_destroy",
610            Self::NR_io_getevents => "io_getevents",
611            Self::NR_io_submit => "io_submit",
612            Self::NR_io_cancel => "io_cancel",
613            Self::NR_get_thread_area => "get_thread_area",
614            Self::NR_lookup_dcookie => "lookup_dcookie",
615            Self::NR_epoll_create => "epoll_create",
616            Self::NR_epoll_ctl_old => "epoll_ctl_old",
617            Self::NR_epoll_wait_old => "epoll_wait_old",
618            Self::NR_remap_file_pages => "remap_file_pages",
619            Self::NR_getdents64 => "getdents64",
620            Self::NR_set_tid_address => "set_tid_address",
621            Self::NR_restart_syscall => "restart_syscall",
622            Self::NR_semtimedop => "semtimedop",
623            Self::NR_fadvise64 => "fadvise64",
624            Self::NR_timer_create => "timer_create",
625            Self::NR_timer_settime => "timer_settime",
626            Self::NR_timer_gettime => "timer_gettime",
627            Self::NR_timer_getoverrun => "timer_getoverrun",
628            Self::NR_timer_delete => "timer_delete",
629            Self::NR_clock_settime => "clock_settime",
630            Self::NR_clock_gettime => "clock_gettime",
631            Self::NR_clock_getres => "clock_getres",
632            Self::NR_clock_nanosleep => "clock_nanosleep",
633            Self::NR_exit_group => "exit_group",
634            Self::NR_epoll_wait => "epoll_wait",
635            Self::NR_epoll_ctl => "epoll_ctl",
636            Self::NR_tgkill => "tgkill",
637            Self::NR_utimes => "utimes",
638            Self::NR_vserver => "vserver",
639            Self::NR_mbind => "mbind",
640            Self::NR_set_mempolicy => "set_mempolicy",
641            Self::NR_get_mempolicy => "get_mempolicy",
642            Self::NR_mq_open => "mq_open",
643            Self::NR_mq_unlink => "mq_unlink",
644            Self::NR_mq_timedsend => "mq_timedsend",
645            Self::NR_mq_timedreceive => "mq_timedreceive",
646            Self::NR_mq_notify => "mq_notify",
647            Self::NR_mq_getsetattr => "mq_getsetattr",
648            Self::NR_kexec_load => "kexec_load",
649            Self::NR_waitid => "waitid",
650            Self::NR_add_key => "add_key",
651            Self::NR_request_key => "request_key",
652            Self::NR_keyctl => "keyctl",
653            Self::NR_ioprio_set => "ioprio_set",
654            Self::NR_ioprio_get => "ioprio_get",
655            Self::NR_inotify_init => "inotify_init",
656            Self::NR_inotify_add_watch => "inotify_add_watch",
657            Self::NR_inotify_rm_watch => "inotify_rm_watch",
658            Self::NR_migrate_pages => "migrate_pages",
659            Self::NR_openat => "openat",
660            Self::NR_mkdirat => "mkdirat",
661            Self::NR_mknodat => "mknodat",
662            Self::NR_fchownat => "fchownat",
663            Self::NR_futimesat => "futimesat",
664            Self::NR_newfstatat => "newfstatat",
665            Self::NR_unlinkat => "unlinkat",
666            Self::NR_renameat => "renameat",
667            Self::NR_linkat => "linkat",
668            Self::NR_symlinkat => "symlinkat",
669            Self::NR_readlinkat => "readlinkat",
670            Self::NR_fchmodat => "fchmodat",
671            Self::NR_faccessat => "faccessat",
672            Self::NR_pselect6 => "pselect6",
673            Self::NR_ppoll => "ppoll",
674            Self::NR_unshare => "unshare",
675            Self::NR_set_robust_list => "set_robust_list",
676            Self::NR_get_robust_list => "get_robust_list",
677            Self::NR_splice => "splice",
678            Self::NR_tee => "tee",
679            Self::NR_sync_file_range => "sync_file_range",
680            Self::NR_vmsplice => "vmsplice",
681            Self::NR_move_pages => "move_pages",
682            Self::NR_utimensat => "utimensat",
683            Self::NR_epoll_pwait => "epoll_pwait",
684            Self::NR_signalfd => "signalfd",
685            Self::NR_timerfd_create => "timerfd_create",
686            Self::NR_eventfd => "eventfd",
687            Self::NR_fallocate => "fallocate",
688            Self::NR_timerfd_settime => "timerfd_settime",
689            Self::NR_timerfd_gettime => "timerfd_gettime",
690            Self::NR_accept4 => "accept4",
691            Self::NR_signalfd4 => "signalfd4",
692            Self::NR_eventfd2 => "eventfd2",
693            Self::NR_epoll_create1 => "epoll_create1",
694            Self::NR_dup3 => "dup3",
695            Self::NR_pipe2 => "pipe2",
696            Self::NR_inotify_init1 => "inotify_init1",
697            Self::NR_preadv => "preadv",
698            Self::NR_pwritev => "pwritev",
699            Self::NR_rt_tgsigqueueinfo => "rt_tgsigqueueinfo",
700            Self::NR_perf_event_open => "perf_event_open",
701            Self::NR_recvmmsg => "recvmmsg",
702            Self::NR_fanotify_init => "fanotify_init",
703            Self::NR_fanotify_mark => "fanotify_mark",
704            Self::NR_prlimit64 => "prlimit64",
705            Self::NR_name_to_handle_at => "name_to_handle_at",
706            Self::NR_open_by_handle_at => "open_by_handle_at",
707            Self::NR_clock_adjtime => "clock_adjtime",
708            Self::NR_syncfs => "syncfs",
709            Self::NR_sendmmsg => "sendmmsg",
710            Self::NR_setns => "setns",
711            Self::NR_getcpu => "getcpu",
712            Self::NR_process_vm_readv => "process_vm_readv",
713            Self::NR_process_vm_writev => "process_vm_writev",
714            Self::NR_kcmp => "kcmp",
715            Self::NR_finit_module => "finit_module",
716            Self::NR_sched_setattr => "sched_setattr",
717            Self::NR_sched_getattr => "sched_getattr",
718            Self::NR_renameat2 => "renameat2",
719            Self::NR_seccomp => "seccomp",
720            Self::NR_getrandom => "getrandom",
721            Self::NR_memfd_create => "memfd_create",
722            Self::NR_kexec_file_load => "kexec_file_load",
723            Self::NR_bpf => "bpf",
724            Self::NR_execveat => "execveat",
725            Self::NR_userfaultfd => "userfaultfd",
726            Self::NR_membarrier => "membarrier",
727            Self::NR_mlock2 => "mlock2",
728            Self::NR_copy_file_range => "copy_file_range",
729            Self::NR_preadv2 => "preadv2",
730            Self::NR_pwritev2 => "pwritev2",
731            Self::NR_pkey_mprotect => "pkey_mprotect",
732            Self::NR_pkey_alloc => "pkey_alloc",
733            Self::NR_pkey_free => "pkey_free",
734            Self::NR_statx => "statx",
735            Self::NR_io_pgetevents => "io_pgetevents",
736            Self::NR_rseq => "rseq",
737            Self::NR_uretprobe => "uretprobe",
738            Self::NR_pidfd_send_signal => "pidfd_send_signal",
739            Self::NR_io_uring_setup => "io_uring_setup",
740            Self::NR_io_uring_enter => "io_uring_enter",
741            Self::NR_io_uring_register => "io_uring_register",
742            Self::NR_open_tree => "open_tree",
743            Self::NR_move_mount => "move_mount",
744            Self::NR_fsopen => "fsopen",
745            Self::NR_fsconfig => "fsconfig",
746            Self::NR_fsmount => "fsmount",
747            Self::NR_fspick => "fspick",
748            Self::NR_pidfd_open => "pidfd_open",
749            Self::NR_clone3 => "clone3",
750            Self::NR_close_range => "close_range",
751            Self::NR_openat2 => "openat2",
752            Self::NR_pidfd_getfd => "pidfd_getfd",
753            Self::NR_faccessat2 => "faccessat2",
754            Self::NR_process_madvise => "process_madvise",
755            Self::NR_epoll_pwait2 => "epoll_pwait2",
756            Self::NR_mount_setattr => "mount_setattr",
757            Self::NR_quotactl_fd => "quotactl_fd",
758            Self::NR_landlock_create_ruleset => "landlock_create_ruleset",
759            Self::NR_landlock_add_rule => "landlock_add_rule",
760            Self::NR_landlock_restrict_self => "landlock_restrict_self",
761            Self::NR_memfd_secret => "memfd_secret",
762            Self::NR_process_mrelease => "process_mrelease",
763            Self::NR_futex_waitv => "futex_waitv",
764            Self::NR_set_mempolicy_home_node => "set_mempolicy_home_node",
765            Self::NR_cachestat => "NR_cachestat",
766            Self::NR_fchmodat2 => "NR_fchmodat2",
767            Self::NR_map_shadow_stack => "NR_map_shadow_stack",
768            Self::NR_futex_wake => "NR_futex_wake",
769            Self::NR_futex_wait => "NR_futex_wait",
770            Self::NR_futex_requeue => "NR_futex_requeue",
771            Self::NR_statmount => "NR_statmount",
772            Self::NR_listmount => "NR_listmount",
773            Self::NR_lsm_get_self_attr => "NR_lsm_get_self_attr",
774            Self::NR_lsm_set_self_attr => "NR_lsm_set_self_attr",
775            Self::NR_lsm_list_modules => "NR_lsm_list_modules",
776            Self::NR_mseal => "NR_mseal",
777            _ => return None,
778        })
779    }
780}
781
782impl core::fmt::Display for SyscallNum {
783    fn fmt(&self, formatter: &mut core::fmt::Formatter<'_>) -> Result<(), core::fmt::Error> {
784        match self.to_str() {
785            Some(s) => formatter.write_str(s),
786            None => write!(formatter, "(unknown syscall {})", self.0),
787        }
788    }
789}
790
791impl core::fmt::Debug for SyscallNum {
792    fn fmt(&self, formatter: &mut core::fmt::Formatter<'_>) -> Result<(), core::fmt::Error> {
793        match self.to_str() {
794            Some(s) => write!(formatter, "SyscallNum::{s}"),
795            None => write!(formatter, "SyscallNum::<{}>", self.0),
796        }
797    }
798}
799
800impl From<SyscallNum> for u32 {
801    #[inline]
802    fn from(val: SyscallNum) -> Self {
803        val.0
804    }
805}
806
807impl From<u32> for SyscallNum {
808    #[inline]
809    fn from(val: u32) -> Self {
810        Self::new(val)
811    }
812}