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(void); } 6927 STD LINUX { int linux_alarm(l_uint secs); } 7028 STD LINUX { int linux_fstat(l_uint fd, struct ostat *up); } 7129 STD LINUX { int linux_pause(void); } 7230 STD LINUX { int linux_utime(char *fname, \ 73 struct l_utimbuf *times); } 7431 UNIMPL LINUX stty 7532 UNIMPL LINUX gtty 7633 STD LINUX { int linux_access(char *path, l_int flags); } 7734 STD LINUX { int linux_nice(l_int inc); } 7835 UNIMPL LINUX ftime 7936 NOPROTO LINUX { int sync(void); } 8037 STD LINUX { int linux_kill(l_int pid, l_int signum); } 8138 STD LINUX { int linux_rename(char *from, char *to); } 8239 STD LINUX { int linux_mkdir(char *path, l_int mode); } 8340 STD LINUX { int linux_rmdir(char *path); } 8441 NOPROTO LINUX { int dup(u_int fd); } 8542 STD LINUX { int linux_pipe(l_ulong *pipefds); } 8643 STD LINUX { int linux_times(struct l_times_argv *buf); } 8744 UNIMPL LINUX prof 8845 STD LINUX { int linux_brk(l_ulong dsend); } 8946 STD LINUX { int linux_setgid16(l_gid16_t gid); } 9047 STD LINUX { int linux_getgid16(void); } 9148 STD LINUX { int linux_signal(l_int sig, l_handler_t handler); } 9249 STD LINUX { int linux_geteuid16(void); } 9350 STD LINUX { int linux_getegid16(void); } 9451 NOPROTO LINUX { int acct(char *path); } 9552 STD LINUX { int linux_umount(char *path, l_int flags); } 9653 UNIMPL LINUX lock 9754 STD LINUX { int linux_ioctl(l_uint fd, l_uint cmd, \ 98 l_ulong arg); } 9955 STD LINUX { int linux_fcntl(l_uint fd, l_uint cmd, \ 100 l_ulong arg); } 10156 UNIMPL LINUX mpx 10257 NOPROTO LINUX { int setpgid(int pid, int pgid); } 10358 UNIMPL LINUX ulimit 10459 STD LINUX { int linux_olduname(void); } 10560 NOPROTO LINUX { int umask(int newmask); } 10661 NOPROTO LINUX { int chroot(char *path); } 10762 STD LINUX { int linux_ustat(l_dev_t dev, struct l_ustat *ubuf); } 10863 NOPROTO LINUX { int dup2(u_int from, u_int to); } 10964 NOPROTO LINUX { int getppid(void); } 11065 NOPROTO LINUX { int getpgrp(void); } 11166 NOPROTO LINUX { int setsid(void); } 11267 STD LINUX { int linux_sigaction(l_int sig, l_osigaction_t *nsa, \ 113 l_osigaction_t *osa); } 11468 STD LINUX { int linux_sgetmask(void); } 11569 STD LINUX { int linux_ssetmask(l_osigset_t mask); } 11670 STD LINUX { int linux_setreuid16(l_uid16_t ruid, \ 117 l_uid16_t euid); } 11871 STD LINUX { int linux_setregid16(l_gid16_t rgid, \ 119 l_gid16_t egid); } 12072 STD LINUX { int linux_sigsuspend(l_int hist0, l_int hist1, \ 121 l_osigset_t mask); } 12273 STD LINUX { int linux_sigpending(l_osigset_t *mask); } 12374 MNOPROTO LINUX { int osethostname(char *hostname, u_int len); } \ 124 osethostname sethostname_args int 12575 STD LINUX { int linux_setrlimit(l_uint resource, \ 126 struct l_rlimit *rlim); } 12776 STD LINUX { int linux_old_getrlimit(l_uint resource, \ 128 struct l_rlimit *rlim); } 12977 NOPROTO LINUX { int getrusage(int who, struct rusage *rusage); } 13078 NOPROTO LINUX { int gettimeofday(struct timeval *tp, \ 131 struct timezone *tzp); } 13279 MNOPROTO LINUX { int settimeofday(struct timeval *tp, \ 133 struct timezone *tzp); } 13480 STD LINUX { int linux_getgroups16(l_uint gidsetsize, \ 135 l_gid16_t *gidset); } 13681 STD LINUX { int linux_setgroups16(l_uint gidsetsize, \ 137 l_gid16_t *gidset); } 13882 STD LINUX { int linux_old_select(struct l_old_select_argv \ 139 *ptr); } 14083 STD LINUX { int linux_symlink(char *path, char *to); } 14184 NOPROTO LINUX { int ostat(char *path, struct ostat *up); } 14285 STD LINUX { int linux_readlink(char *name, char *buf, \ 143 l_int count); } 14486 STD LINUX { int linux_uselib(char *library); } 14587 NOPROTO LINUX { int swapon(char *name); } 14688 STD LINUX { int linux_reboot(l_int magic1, l_int magic2, \ 147 l_uint cmd, void *arg); } 14889 STD LINUX { int linux_readdir(l_uint fd, struct l_dirent *dent, \ 149 l_uint count); } 15090 STD LINUX { int linux_mmap(struct l_mmap_argv *ptr); } 15191 NOPROTO LINUX { int munmap(caddr_t addr, int len); } 15292 STD LINUX { int linux_truncate(char *path, l_ulong length); } 15393 NOPROTO LINUX { int oftruncate(int fd, long length); } 15494 NOPROTO LINUX { int fchmod(int fd, int mode); } 15595 NOPROTO LINUX { int fchown(int fd, int uid, int gid); } 15696 NOPROTO LINUX { int getpriority(int which, int who); } 15797 NOPROTO LINUX { int setpriority(int which, int who, int prio); } 15898 UNIMPL LINUX profil 15999 STD LINUX { int linux_statfs(char *path, \ 160 struct l_statfs_buf *buf); } 161100 STD LINUX { int linux_fstatfs(l_uint fd, \ 162 struct l_statfs_buf *buf); } 163101 STD LINUX { int linux_ioperm(l_ulong start, l_ulong length, \ 164 l_int enable); } 165102 STD LINUX { int linux_socketcall(l_int what, l_ulong args); } 166103 STD LINUX { int linux_syslog(l_int type, char *buf, l_int len); } 167104 STD LINUX { int linux_setitimer(l_int which, \ 168 struct l_itimerval *itv, \ 169 struct l_itimerval *oitv); } 170105 STD LINUX { int linux_getitimer(l_int which, \ 171 struct l_itimerval *itv); } 172106 STD LINUX { int linux_newstat(char *path, \ 173 struct l_newstat *buf); } 174107 STD LINUX { int linux_newlstat(char *path, \ 175 struct l_newstat *buf); } 176108 STD LINUX { int linux_newfstat(l_uint fd, \ 177 struct l_newstat *buf); } 178109 STD LINUX { int linux_uname(void); } 179110 STD LINUX { int linux_iopl(l_ulong level); } 180111 STD LINUX { int linux_vhangup(void); } 181112 UNIMPL LINUX idle 182113 STD LINUX { int linux_vm86old(void); } 183114 STD LINUX { int linux_wait4(l_pid_t pid, l_uint *status, \ 184 l_int options, struct l_rusage *rusage); } 185115 STD LINUX { int linux_swapoff(void); } 186116 STD LINUX { int linux_sysinfo(struct l_sysinfo *info); } 187117 STD LINUX { int linux_ipc(l_uint what, l_int arg1, l_int arg2, \ 188 l_int arg3, void *ptr, l_long arg5); } 189118 NOPROTO LINUX { int fsync(int fd); } 190119 STD LINUX { int linux_sigreturn(struct l_sigframe *sfp); } 191120 STD LINUX { int linux_clone(l_int flags, void *stack); } 192121 MNOPROTO LINUX { int setdomainname(char *name, int len); } 193122 STD LINUX { int linux_newuname(struct l_new_utsname *buf); } 194123 STD LINUX { int linux_modify_ldt(l_int func, void *ptr, \ 195 l_ulong bytecount); } 196124 STD LINUX { int linux_adjtimex(void); } 197125 NOPROTO LINUX { int mprotect(caddr_t addr, int len, int prot); } 198126 STD LINUX { int linux_sigprocmask(l_int how, l_osigset_t *mask, \ 199 l_osigset_t *omask); } 200127 STD LINUX { int linux_create_module(void); } 201128 STD LINUX { int linux_init_module(void); } 202129 STD LINUX { int linux_delete_module(void); } 203130 STD LINUX { int linux_get_kernel_syms(void); } 204131 STD LINUX { int linux_quotactl(void); } 205132 NOPROTO LINUX { int getpgid(int pid); } 206133 NOPROTO LINUX { int fchdir(int fd); } 207134 STD LINUX { int linux_bdflush(void); } 208135 STD LINUX { int linux_sysfs(l_int option, l_ulong arg1, \ 209 l_ulong arg2); } 210136 STD LINUX { int linux_personality(l_ulong per); } 211137 UNIMPL LINUX afs_syscall 212138 STD LINUX { int linux_setfsuid16(l_uid16_t uid); } 213139 STD LINUX { int linux_setfsgid16(l_gid16_t gid); } 214140 STD LINUX { int linux_llseek(l_int fd, l_ulong ohigh, \ 215 l_ulong olow, l_loff_t *res, l_uint whence); } 216141 STD LINUX { int linux_getdents(l_uint fd, void *dent, \ 217 l_uint count); } 218142 STD LINUX { int linux_select(l_int nfds, l_fd_set *readfds, \ 219 l_fd_set *writefds, l_fd_set *exceptfds, \ 220 struct l_timeval *timeout); } 221143 NOPROTO LINUX { int flock(int fd, int how); } 222144 STD LINUX { int linux_msync(l_ulong addr, l_size_t len, \ 223 l_int fl); } 224145 NOPROTO LINUX { int readv(int fd, struct iovec *iovp, \ 225 u_int iovcnt); } 226146 NOPROTO LINUX { int writev(int fd, struct iovec *iovp, \ 227 u_int iovcnt); } 228147 STD LINUX { int linux_getsid(l_pid_t pid); } 229148 STD LINUX { int linux_fdatasync(l_uint fd); } 230149 STD LINUX { int linux_sysctl(struct l___sysctl_args *args); } 231150 NOPROTO BSD { int mlock(const void *addr, size_t len); } 232151 NOPROTO BSD { int munlock(const void *addr, size_t len); } 233152 NOPROTO BSD { int mlockall(int how); } 234153 NOPROTO BSD { int munlockall(void); } 235154 NOPROTO POSIX { int sched_setparam(pid_t pid, \ 236 const struct sched_param *param); } 237155 NOPROTO POSIX { int sched_getparam(pid_t pid, \ 238 struct sched_param *param); } 239156 STD POSIX { int linux_sched_setscheduler(l_pid_t pid, \ 240 l_int policy, struct l_sched_param *param); } 241157 STD POSIX { int linux_sched_getscheduler(l_pid_t pid); } 242158 NOPROTO POSIX { int sched_yield(void); } 243159 STD POSIX { int linux_sched_get_priority_max(l_int policy); } 244160 STD POSIX { int linux_sched_get_priority_min(l_int policy); } 245161 NOPROTO POSIX { int sched_rr_get_interval(l_pid_t pid, \ 246 struct l_timespec *interval); } 247162 MNOPROTO POSIX { int nanosleep(const struct timespec *rqtp, \ 248 struct timespec *rmtp); } 249163 STD LINUX { int linux_mremap(l_ulong addr, l_ulong old_len, \ 250 l_ulong new_len, l_ulong flags, \ 251 l_ulong new_addr); } 252164 STD LINUX { int linux_setresuid16(l_uid16_t ruid, \ 253 l_uid16_t euid, l_uid16_t suid); } 254165 STD LINUX { int linux_getresuid16(l_uid16_t *ruid, \ 255 l_uid16_t *euid, l_uid16_t *suid); } 256166 STD LINUX { int linux_vm86(void); } 257167 STD LINUX { int linux_query_module(void); } 258168 NOPROTO LINUX { int poll(struct pollfd*, unsigned int nfds, \ 259 long timeout); } 260169 STD LINUX { int linux_nfsservctl(void); } 261170 STD LINUX { int linux_setresgid16(l_gid16_t rgid, \ 262 l_gid16_t egid, l_gid16_t sgid); } 263171 STD LINUX { int linux_getresgid16(l_gid16_t *rgid, \ 264 l_gid16_t *egid, l_gid16_t *sgid); } 265172 STD LINUX { int linux_prctl(void); } 266173 STD LINUX { int linux_rt_sigreturn(struct l_ucontext *ucp); } 267174 STD LINUX { int linux_rt_sigaction(l_int sig, \ 268 l_sigaction_t *act, l_sigaction_t *oact, \ 269 l_size_t sigsetsize); } 270175 STD LINUX { int linux_rt_sigprocmask(l_int how, \ 271 l_sigset_t *mask, l_sigset_t *omask, \ 272 l_size_t sigsetsize); } 273176 STD LINUX { int linux_rt_sigpending(void); } 274177 STD LINUX { int linux_rt_sigtimedwait(void); } 275178 STD LINUX { int linux_rt_sigqueueinfo(void); } 276179 STD LINUX { int linux_rt_sigsuspend(l_sigset_t *newset, \ 277 l_size_t sigsetsize); } 278180 STD LINUX { int linux_pread(l_uint fd, char *buf, \ 279 l_size_t nbyte, l_loff_t offset); } 280181 STD LINUX { int linux_pwrite(l_uint fd, char *buf, \ 281 l_size_t nbyte, l_loff_t offset); } 282182 STD LINUX { int linux_chown16(char *path, l_uid16_t uid, \ 283 l_gid16_t gid); } 284183 STD LINUX { int linux_getcwd(char *buf, l_ulong bufsize); } 285184 STD LINUX { int linux_capget(void); } 286185 STD LINUX { int linux_capset(void); } 287186 STD LINUX { int linux_sigaltstack(l_stack_t *uss, \ 288 l_stack_t *uoss); } 289187 STD LINUX { int linux_sendfile(void); } 290188 UNIMPL LINUX getpmsg 291189 UNIMPL LINUX putpmsg 292190 MSTD LINUX { int linux_vfork(void); } 293191 STD LINUX { int linux_getrlimit(l_uint resource, \ 294 struct l_rlimit *rlim); } 295192 STD LINUX { int linux_mmap2(l_ulong addr, l_ulong len, \ 296 l_ulong prot, l_ulong flags, l_ulong fd, \ 297 l_ulong pgoff); } 298193 STD LINUX { int linux_truncate64(char *path, l_loff_t length); } 299194 STD LINUX { int linux_ftruncate64(l_uint fd, l_loff_t length); } 300195 STD LINUX { int linux_stat64(char *filename, \ 301 struct l_stat64 *statbuf, l_long flags); } 302196 STD LINUX { int linux_lstat64(char *filename, \ 303 struct l_stat64 *statbuf, l_long flags); } 304197 STD LINUX { int linux_fstat64(l_ulong fd, \ 305 struct l_stat64 *statbuf, l_long flags); } 306198 STD LINUX { int linux_lchown(char *path, l_uid_t uid, \ 307 l_gid_t gid); } 308199 STD POSIX { int linux_getuid(void); } 309200 STD POSIX { int linux_getgid(void); } 310201 NOPROTO POSIX { int geteuid(void); } 311202 NOPROTO POSIX { int getegid(void); } 312203 NOPROTO LINUX { int setreuid(uid_t ruid, uid_t euid); } 313204 NOPROTO LINUX { int setregid(gid_t rgid, gid_t egid); } 314205 STD LINUX { int linux_getgroups(l_int gidsetsize, \ 315 l_gid_t *grouplist); } 316206 STD LINUX { int linux_setgroups(l_int gidsetsize, \ 317 l_gid_t *grouplist); } 318207 NODEF LINUX fchown fchown fchown_args int 319208 NOPROTO LINUX { int setresuid(uid_t ruid, uid_t euid, uid_t suid); } 320209 NOPROTO LINUX { int getresuid(uid_t *ruid, uid_t *euid, \ 321 uid_t *suid); } 322210 NOPROTO LINUX { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); } 323211 NOPROTO LINUX { int getresgid(gid_t *rgid, gid_t *egid, \ 324 gid_t *sgid); } 325212 STD LINUX { int linux_chown(char *path, l_uid_t uid, \ 326 l_gid_t gid); } 327213 NOPROTO LINUX { int setuid(uid_t uid); } 328214 NOPROTO LINUX { int setgid(gid_t gid); } 329215 STD LINUX { int linux_setfsuid(l_uid_t uid); } 330216 STD LINUX { int linux_setfsgid(l_gid_t gid); } 331217 STD LINUX { int linux_pivot_root(char *new_root, \ 332 char *put_old); } 333218 STD LINUX { int linux_mincore(l_ulong start, l_size_t len, \ 334 u_char *vec); } 335219 STD LINUX { int linux_madvise(void); } 336220 STD LINUX { int linux_getdents64(l_uint fd, void *dirent, \ 337 l_uint count); } 338221 STD LINUX { int linux_fcntl64(l_uint fd, l_uint cmd, \ 339 l_ulong arg); } 340