1 $FreeBSD$ 2 3; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 4; System call name/number master file (or rather, slave, from LINUX). 5; Processed to create linux_sysent.c, linux_proto.h and linux_syscall.h. 6 7; Columns: number type nargs namespc name alt{name,tag,rtyp}/comments 8; number system call number, must be in order 9; type one of STD, OBSOL, UNIMPL, COMPAT 10; namespc one of POSIX, BSD, STD, NOHIDE (I dont care :-) -Peter 11; name psuedo-prototype of syscall routine 12; If one of the following alts is different, then all appear: 13; altname name of system call if different 14; alttag name of args struct tag if different from [o]`name'"_args" 15; altrtyp return type if not int (bogus - syscalls always return int) 16; for UNIMPL/OBSOL, name continues with comments 17 18; types: 19; STD always included 20; COMPAT included on COMPAT #ifdef 21; LIBCOMPAT included on COMPAT #ifdef, and placed in syscall.h 22; OBSOL obsolete, not included in system, only specifies name 23; UNIMPL not implemented, placeholder only 24 25#include "opt_compat.h" 26#include <sys/param.h> 27#include <sys/sysent.h> 28#include <sys/sysproto.h> 29#include <i386/linux/linux.h> 30#include <i386/linux/linux_proto.h> 31 32; #ifdef's, etc. may be included, and are copied to the output files. 33 340 UNIMPL LINUX setup 351 MNOPROTO LINUX { void sys_exit(int rval); } exit sys_exit_args void 362 MSTD LINUX { int linux_fork(void); } 373 NOPROTO LINUX { int read(int fd, char *buf, u_int nbyte); } 384 NOPROTO LINUX { int write(int fd, char *buf, u_int nbyte); } 395 STD LINUX { int linux_open(char *path, l_int flags, \ 40 l_int mode); } 416 NOPROTO LINUX { int close(int fd); } 427 STD LINUX { int linux_waitpid(l_pid_t pid, l_int *status, \ 43 l_int options); } 448 STD LINUX { int linux_creat(char *path, l_int mode); } 459 STD LINUX { int linux_link(char *path, char *to); } 4610 STD LINUX { int linux_unlink(char *path); } 4711 STD LINUX { int linux_execve(char *path, char **argp, \ 48 char **envp); } 4912 STD LINUX { int linux_chdir(char *path); } 5013 STD LINUX { int linux_time(l_time_t *tm); } 5114 STD LINUX { int linux_mknod(char *path, l_int mode, \ 52 l_dev_t dev); } 5315 STD LINUX { int linux_chmod(char *path, l_mode_t mode); } 5416 STD LINUX { int linux_lchown16(char *path, l_uid16_t uid, \ 55 l_gid16_t gid); } 5617 UNIMPL LINUX break 5718 STD LINUX { int linux_stat(char *path, struct ostat *up); } 5819 STD LINUX { int linux_lseek(l_uint fdes, l_off_t off, \ 59 l_int whence); } 6020 STD LINUX { int linux_getpid(void); } 6121 STD LINUX { int linux_mount(char *specialfile, char *dir, \ 62 char *filesystemtype, l_ulong rwflag, \ 63 void *data); } 6422 STD LINUX { int linux_oldumount(char *path); } 6523 STD LINUX { int linux_setuid16(l_uid16_t uid); } 6624 STD LINUX { int linux_getuid16(void); } 6725 STD LINUX { int linux_stime(void); } 6826 STD LINUX { int linux_ptrace(l_long req, l_long pid, l_long addr, \ 69 l_long data); } 7027 STD LINUX { int linux_alarm(l_uint secs); } 7128 STD LINUX { int linux_fstat(l_uint fd, struct ostat *up); } 7229 STD LINUX { int linux_pause(void); } 7330 STD LINUX { int linux_utime(char *fname, \ 74 struct l_utimbuf *times); } 7531 UNIMPL LINUX stty 7632 UNIMPL LINUX gtty 7733 STD LINUX { int linux_access(char *path, l_int flags); } 7834 STD LINUX { int linux_nice(l_int inc); } 7935 UNIMPL LINUX ftime 8036 NOPROTO LINUX { int sync(void); } 8137 STD LINUX { int linux_kill(l_int pid, l_int signum); } 8238 STD LINUX { int linux_rename(char *from, char *to); } 8339 STD LINUX { int linux_mkdir(char *path, l_int mode); } 8440 STD LINUX { int linux_rmdir(char *path); } 8541 NOPROTO LINUX { int dup(u_int fd); } 8642 STD LINUX { int linux_pipe(l_ulong *pipefds); } 8743 STD LINUX { int linux_times(struct l_times_argv *buf); } 8844 UNIMPL LINUX prof 8945 STD LINUX { int linux_brk(l_ulong dsend); } 9046 STD LINUX { int linux_setgid16(l_gid16_t gid); } 9147 STD LINUX { int linux_getgid16(void); } 9248 STD LINUX { int linux_signal(l_int sig, l_handler_t handler); } 9349 STD LINUX { int linux_geteuid16(void); } 9450 STD LINUX { int linux_getegid16(void); } 9551 NOPROTO LINUX { int acct(char *path); } 9652 STD LINUX { int linux_umount(char *path, l_int flags); } 9753 UNIMPL LINUX lock 9854 STD LINUX { int linux_ioctl(l_uint fd, l_uint cmd, \ 99 l_ulong arg); } 10055 STD LINUX { int linux_fcntl(l_uint fd, l_uint cmd, \ 101 l_ulong arg); } 10256 UNIMPL LINUX mpx 10357 NOPROTO LINUX { int setpgid(int pid, int pgid); } 10458 UNIMPL LINUX ulimit 10559 STD LINUX { int linux_olduname(void); } 10660 NOPROTO LINUX { int umask(int newmask); } 10761 NOPROTO LINUX { int chroot(char *path); } 10862 STD LINUX { int linux_ustat(l_dev_t dev, struct l_ustat *ubuf); } 10963 NOPROTO LINUX { int dup2(u_int from, u_int to); } 11064 NOPROTO LINUX { int getppid(void); } 11165 NOPROTO LINUX { int getpgrp(void); } 11266 NOPROTO LINUX { int setsid(void); } 11367 STD LINUX { int linux_sigaction(l_int sig, l_osigaction_t *nsa, \ 114 l_osigaction_t *osa); } 11568 STD LINUX { int linux_sgetmask(void); } 11669 STD LINUX { int linux_ssetmask(l_osigset_t mask); } 11770 STD LINUX { int linux_setreuid16(l_uid16_t ruid, \ 118 l_uid16_t euid); } 11971 STD LINUX { int linux_setregid16(l_gid16_t rgid, \ 120 l_gid16_t egid); } 12172 STD LINUX { int linux_sigsuspend(l_int hist0, l_int hist1, \ 122 l_osigset_t mask); } 12373 STD LINUX { int linux_sigpending(l_osigset_t *mask); } 12474 MNOPROTO LINUX { int osethostname(char *hostname, u_int len); } \ 125 osethostname sethostname_args int 12675 STD LINUX { int linux_setrlimit(l_uint resource, \ 127 struct l_rlimit *rlim); } 12876 STD LINUX { int linux_old_getrlimit(l_uint resource, \ 129 struct l_rlimit *rlim); } 13077 NOPROTO LINUX { int getrusage(int who, struct rusage *rusage); } 13178 NOPROTO LINUX { int gettimeofday(struct timeval *tp, \ 132 struct timezone *tzp); } 13379 MNOPROTO LINUX { int settimeofday(struct timeval *tp, \ 134 struct timezone *tzp); } 13580 STD LINUX { int linux_getgroups16(l_uint gidsetsize, \ 136 l_gid16_t *gidset); } 13781 STD LINUX { int linux_setgroups16(l_uint gidsetsize, \ 138 l_gid16_t *gidset); } 13982 STD LINUX { int linux_old_select(struct l_old_select_argv \ 140 *ptr); } 14183 STD LINUX { int linux_symlink(char *path, char *to); } 14284 NOPROTO LINUX { int ostat(char *path, struct ostat *up); } 14385 STD LINUX { int linux_readlink(char *name, char *buf, \ 144 l_int count); } 14586 STD LINUX { int linux_uselib(char *library); } 14687 NOPROTO LINUX { int swapon(char *name); } 14788 STD LINUX { int linux_reboot(l_int magic1, l_int magic2, \ 148 l_uint cmd, void *arg); } 14989 STD LINUX { int linux_readdir(l_uint fd, struct l_dirent *dent, \ 150 l_uint count); } 15190 STD LINUX { int linux_mmap(struct l_mmap_argv *ptr); } 15291 NOPROTO LINUX { int munmap(caddr_t addr, int len); } 15392 STD LINUX { int linux_truncate(char *path, l_ulong length); } 15493 NOPROTO LINUX { int oftruncate(int fd, long length); } 15594 NOPROTO LINUX { int fchmod(int fd, int mode); } 15695 NOPROTO LINUX { int fchown(int fd, int uid, int gid); } 15796 NOPROTO LINUX { int getpriority(int which, int who); } 15897 NOPROTO LINUX { int setpriority(int which, int who, int prio); } 15998 UNIMPL LINUX profil 16099 STD LINUX { int linux_statfs(char *path, \ 161 struct l_statfs_buf *buf); } 162100 STD LINUX { int linux_fstatfs(l_uint fd, \ 163 struct l_statfs_buf *buf); } 164101 STD LINUX { int linux_ioperm(l_ulong start, l_ulong length, \ 165 l_int enable); } 166102 STD LINUX { int linux_socketcall(l_int what, l_ulong args); } 167103 STD LINUX { int linux_syslog(l_int type, char *buf, l_int len); } 168104 STD LINUX { int linux_setitimer(l_int which, \ 169 struct l_itimerval *itv, \ 170 struct l_itimerval *oitv); } 171105 STD LINUX { int linux_getitimer(l_int which, \ 172 struct l_itimerval *itv); } 173106 STD LINUX { int linux_newstat(char *path, \ 174 struct l_newstat *buf); } 175107 STD LINUX { int linux_newlstat(char *path, \ 176 struct l_newstat *buf); } 177108 STD LINUX { int linux_newfstat(l_uint fd, \ 178 struct l_newstat *buf); } 179109 STD LINUX { int linux_uname(void); } 180110 STD LINUX { int linux_iopl(l_ulong level); } 181111 STD LINUX { int linux_vhangup(void); } 182112 UNIMPL LINUX idle 183113 STD LINUX { int linux_vm86old(void); } 184114 STD LINUX { int linux_wait4(l_pid_t pid, l_uint *status, \ 185 l_int options, struct l_rusage *rusage); } 186115 STD LINUX { int linux_swapoff(void); } 187116 STD LINUX { int linux_sysinfo(struct l_sysinfo *info); } 188117 STD LINUX { int linux_ipc(l_uint what, l_int arg1, l_int arg2, \ 189 l_int arg3, void *ptr, l_long arg5); } 190118 NOPROTO LINUX { int fsync(int fd); } 191119 STD LINUX { int linux_sigreturn(struct l_sigframe *sfp); } 192120 STD LINUX { int linux_clone(l_int flags, void *stack); } 193121 MNOPROTO LINUX { int setdomainname(char *name, int len); } 194122 STD LINUX { int linux_newuname(struct l_new_utsname *buf); } 195123 STD LINUX { int linux_modify_ldt(l_int func, void *ptr, \ 196 l_ulong bytecount); } 197124 STD LINUX { int linux_adjtimex(void); } 198125 NOPROTO LINUX { int mprotect(caddr_t addr, int len, int prot); } 199126 STD LINUX { int linux_sigprocmask(l_int how, l_osigset_t *mask, \ 200 l_osigset_t *omask); } 201127 STD LINUX { int linux_create_module(void); } 202128 STD LINUX { int linux_init_module(void); } 203129 STD LINUX { int linux_delete_module(void); } 204130 STD LINUX { int linux_get_kernel_syms(void); } 205131 STD LINUX { int linux_quotactl(void); } 206132 NOPROTO LINUX { int getpgid(int pid); } 207133 NOPROTO LINUX { int fchdir(int fd); } 208134 STD LINUX { int linux_bdflush(void); } 209135 STD LINUX { int linux_sysfs(l_int option, l_ulong arg1, \ 210 l_ulong arg2); } 211136 STD LINUX { int linux_personality(l_ulong per); } 212137 UNIMPL LINUX afs_syscall 213138 STD LINUX { int linux_setfsuid16(l_uid16_t uid); } 214139 STD LINUX { int linux_setfsgid16(l_gid16_t gid); } 215140 STD LINUX { int linux_llseek(l_int fd, l_ulong ohigh, \ 216 l_ulong olow, l_loff_t *res, l_uint whence); } 217141 STD LINUX { int linux_getdents(l_uint fd, void *dent, \ 218 l_uint count); } 219142 STD LINUX { int linux_select(l_int nfds, l_fd_set *readfds, \ 220 l_fd_set *writefds, l_fd_set *exceptfds, \ 221 struct l_timeval *timeout); } 222143 NOPROTO LINUX { int flock(int fd, int how); } 223144 STD LINUX { int linux_msync(l_ulong addr, l_size_t len, \ 224 l_int fl); } 225145 NOPROTO LINUX { int readv(int fd, struct iovec *iovp, \ 226 u_int iovcnt); } 227146 NOPROTO LINUX { int writev(int fd, struct iovec *iovp, \ 228 u_int iovcnt); } 229147 STD LINUX { int linux_getsid(l_pid_t pid); } 230148 STD LINUX { int linux_fdatasync(l_uint fd); } 231149 STD LINUX { int linux_sysctl(struct l___sysctl_args *args); } 232150 NOPROTO BSD { int mlock(const void *addr, size_t len); } 233151 NOPROTO BSD { int munlock(const void *addr, size_t len); } 234152 NOPROTO BSD { int mlockall(int how); } 235153 NOPROTO BSD { int munlockall(void); } 236154 NOPROTO POSIX { int sched_setparam(pid_t pid, \ 237 const struct sched_param *param); } 238155 NOPROTO POSIX { int sched_getparam(pid_t pid, \ 239 struct sched_param *param); } 240156 STD POSIX { int linux_sched_setscheduler(l_pid_t pid, \ 241 l_int policy, struct l_sched_param *param); } 242157 STD POSIX { int linux_sched_getscheduler(l_pid_t pid); } 243158 NOPROTO POSIX { int sched_yield(void); } 244159 STD POSIX { int linux_sched_get_priority_max(l_int policy); } 245160 STD POSIX { int linux_sched_get_priority_min(l_int policy); } 246161 NOPROTO POSIX { int sched_rr_get_interval(l_pid_t pid, \ 247 struct l_timespec *interval); } 248162 MNOPROTO POSIX { int nanosleep(const struct timespec *rqtp, \ 249 struct timespec *rmtp); } 250163 STD LINUX { int linux_mremap(l_ulong addr, l_ulong old_len, \ 251 l_ulong new_len, l_ulong flags, \ 252 l_ulong new_addr); } 253164 STD LINUX { int linux_setresuid16(l_uid16_t ruid, \ 254 l_uid16_t euid, l_uid16_t suid); } 255165 STD LINUX { int linux_getresuid16(l_uid16_t *ruid, \ 256 l_uid16_t *euid, l_uid16_t *suid); } 257166 STD LINUX { int linux_vm86(void); } 258167 STD LINUX { int linux_query_module(void); } 259168 NOPROTO LINUX { int poll(struct pollfd*, unsigned int nfds, \ 260 long timeout); } 261169 STD LINUX { int linux_nfsservctl(void); } 262170 STD LINUX { int linux_setresgid16(l_gid16_t rgid, \ 263 l_gid16_t egid, l_gid16_t sgid); } 264171 STD LINUX { int linux_getresgid16(l_gid16_t *rgid, \ 265 l_gid16_t *egid, l_gid16_t *sgid); } 266172 STD LINUX { int linux_prctl(void); } 267173 STD LINUX { int linux_rt_sigreturn(struct l_ucontext *ucp); } 268174 STD LINUX { int linux_rt_sigaction(l_int sig, \ 269 l_sigaction_t *act, l_sigaction_t *oact, \ 270 l_size_t sigsetsize); } 271175 STD LINUX { int linux_rt_sigprocmask(l_int how, \ 272 l_sigset_t *mask, l_sigset_t *omask, \ 273 l_size_t sigsetsize); } 274176 STD LINUX { int linux_rt_sigpending(void); } 275177 STD LINUX { int linux_rt_sigtimedwait(void); } 276178 STD LINUX { int linux_rt_sigqueueinfo(void); } 277179 STD LINUX { int linux_rt_sigsuspend(l_sigset_t *newset, \ 278 l_size_t sigsetsize); } 279180 STD LINUX { int linux_pread(l_uint fd, char *buf, \ 280 l_size_t nbyte, l_loff_t offset); } 281181 STD LINUX { int linux_pwrite(l_uint fd, char *buf, \ 282 l_size_t nbyte, l_loff_t offset); } 283182 STD LINUX { int linux_chown16(char *path, l_uid16_t uid, \ 284 l_gid16_t gid); } 285183 STD LINUX { int linux_getcwd(char *buf, l_ulong bufsize); } 286184 STD LINUX { int linux_capget(void); } 287185 STD LINUX { int linux_capset(void); } 288186 STD LINUX { int linux_sigaltstack(l_stack_t *uss, \ 289 l_stack_t *uoss); } 290187 STD LINUX { int linux_sendfile(void); } 291188 UNIMPL LINUX getpmsg 292189 UNIMPL LINUX putpmsg 293190 MSTD LINUX { int linux_vfork(void); } 294191 STD LINUX { int linux_getrlimit(l_uint resource, \ 295 struct l_rlimit *rlim); } 296192 STD LINUX { int linux_mmap2(l_ulong addr, l_ulong len, \ 297 l_ulong prot, l_ulong flags, l_ulong fd, \ 298 l_ulong pgoff); } 299193 STD LINUX { int linux_truncate64(char *path, l_loff_t length); } 300194 STD LINUX { int linux_ftruncate64(l_uint fd, l_loff_t length); } 301195 STD LINUX { int linux_stat64(char *filename, \ 302 struct l_stat64 *statbuf, l_long flags); } 303196 STD LINUX { int linux_lstat64(char *filename, \ 304 struct l_stat64 *statbuf, l_long flags); } 305197 STD LINUX { int linux_fstat64(l_ulong fd, \ 306 struct l_stat64 *statbuf, l_long flags); } 307198 STD LINUX { int linux_lchown(char *path, l_uid_t uid, \ 308 l_gid_t gid); } 309199 STD POSIX { int linux_getuid(void); } 310200 STD POSIX { int linux_getgid(void); } 311201 NOPROTO POSIX { int geteuid(void); } 312202 NOPROTO POSIX { int getegid(void); } 313203 NOPROTO LINUX { int setreuid(uid_t ruid, uid_t euid); } 314204 NOPROTO LINUX { int setregid(gid_t rgid, gid_t egid); } 315205 STD LINUX { int linux_getgroups(l_int gidsetsize, \ 316 l_gid_t *grouplist); } 317206 STD LINUX { int linux_setgroups(l_int gidsetsize, \ 318 l_gid_t *grouplist); } 319207 NODEF LINUX fchown fchown fchown_args int 320208 NOPROTO LINUX { int setresuid(uid_t ruid, uid_t euid, uid_t suid); } 321209 NOPROTO LINUX { int getresuid(uid_t *ruid, uid_t *euid, \ 322 uid_t *suid); } 323210 NOPROTO LINUX { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); } 324211 NOPROTO LINUX { int getresgid(gid_t *rgid, gid_t *egid, \ 325 gid_t *sgid); } 326212 STD LINUX { int linux_chown(char *path, l_uid_t uid, \ 327 l_gid_t gid); } 328213 NOPROTO LINUX { int setuid(uid_t uid); } 329214 NOPROTO LINUX { int setgid(gid_t gid); } 330215 STD LINUX { int linux_setfsuid(l_uid_t uid); } 331216 STD LINUX { int linux_setfsgid(l_gid_t gid); } 332217 STD LINUX { int linux_pivot_root(char *new_root, \ 333 char *put_old); } 334218 STD LINUX { int linux_mincore(l_ulong start, l_size_t len, \ 335 u_char *vec); } 336219 STD LINUX { int linux_madvise(void); } 337220 STD LINUX { int linux_getdents64(l_uint fd, void *dirent, \ 338 l_uint count); } 339221 STD LINUX { int linux_fcntl64(l_uint fd, l_uint cmd, \ 340 l_ulong arg); } 341