diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 592c30579b04..bfbc37aeb314 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -1,4 +1,4 @@ - $NetBSD: syscalls.master,v 1.45 1996/12/22 07:47:43 cgd Exp $ + $NetBSD: syscalls.master,v 1.46 1996/12/22 08:04:06 cgd Exp $ ; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 @@ -48,30 +48,33 @@ 0 INDIR { int sys_syscall(int number, ...); } 1 STD { void sys_exit(int rval); } 2 STD { int sys_fork(void); } -3 STD { ssize_t sys_read(int fd, char *buf, u_int nbyte); } -4 STD { ssize_t sys_write(int fd, char *buf, u_int nbyte); } -5 STD { int sys_open(char *path, int flags, ... int mode); } +3 STD { ssize_t sys_read(int fd, void *buf, size_t nbyte); } +4 STD { ssize_t sys_write(int fd, const void *buf, \ + size_t nbyte); } +5 STD { int sys_open(const char *path, \ + int flags, ... int mode); } 6 STD { int sys_close(int fd); } 7 STD { int sys_wait4(int pid, int *status, int options, \ struct rusage *rusage); } 8 COMPAT_43 { int sys_creat(char *path, int mode); } ocreat -9 STD { int sys_link(char *path, char *link); } -10 STD { int sys_unlink(char *path); } +9 STD { int sys_link(const char *path, const char *link); } +10 STD { int sys_unlink(const char *path); } 11 OBSOL execv -12 STD { int sys_chdir(char *path); } +12 STD { int sys_chdir(const char *path); } 13 STD { int sys_fchdir(int fd); } -14 STD { int sys_mknod(char *path, int mode, int dev); } -15 STD { int sys_chmod(char *path, int mode); } -16 STD { int sys_chown(char *path, int uid, int gid); } +14 STD { int sys_mknod(const char *path, int mode, int dev); } +15 STD { int sys_chmod(const char *path, int mode); } +16 STD { int sys_chown(const char *path, uid_t uid, \ + gid_t gid); } 17 STD { int sys_obreak(char *nsize); } break 18 STD { int sys_getfsstat(struct statfs *buf, long bufsize, \ int flags); } 19 COMPAT_43 { long sys_lseek(int fd, long offset, int whence); } \ olseek 20 STD { pid_t sys_getpid(void); } -21 STD { int sys_mount(char *type, char *path, int flags, \ - caddr_t data); } -22 STD { int sys_unmount(char *path, int flags); } +21 STD { int sys_mount(const char *type, const char *path, \ + int flags, void *data); } +22 STD { int sys_unmount(const char *path, int flags); } 23 STD { int sys_setuid(uid_t uid); } 24 STD { uid_t sys_getuid(void); } 25 STD { uid_t sys_geteuid(void); } @@ -79,17 +82,20 @@ int data); } 27 STD { ssize_t sys_recvmsg(int s, struct msghdr *msg, \ int flags); } -28 STD { ssize_t sys_sendmsg(int s, caddr_t msg, int flags); } -29 STD { ssize_t sys_recvfrom(int s, caddr_t buf, size_t len, \ - int flags, caddr_t from, int *fromlenaddr); } -30 STD { int sys_accept(int s, caddr_t name, int *anamelen); } -31 STD { int sys_getpeername(int fdes, caddr_t asa, \ +28 STD { ssize_t sys_sendmsg(int s, \ + const struct msghdr *msg, int flags); } +29 STD { ssize_t sys_recvfrom(int s, void *buf, size_t len, \ + int flags, struct sockaddr *from, \ + int *fromlenaddr); } +30 STD { int sys_accept(int s, struct sockaddr *name, \ + int *anamelen); } +31 STD { int sys_getpeername(int fdes, struct sockaddr *asa, \ int *alen); } -32 STD { int sys_getsockname(int fdes, caddr_t asa, \ +32 STD { int sys_getsockname(int fdes, struct sockaddr *asa, \ int *alen); } -33 STD { int sys_access(char *path, int flags); } -34 STD { int sys_chflags(char *path, int flags); } -35 STD { int sys_fchflags(int fd, int flags); } +33 STD { int sys_access(const char *path, int flags); } +34 STD { int sys_chflags(const char *path, u_long flags); } +35 STD { int sys_fchflags(int fd, u_long flags); } 36 STD { void sys_sync(void); } 37 STD { int sys_kill(int pid, int signum); } 38 COMPAT_43 { int sys_stat(char *path, struct ostat *ub); } ostat @@ -101,30 +107,34 @@ 44 STD { int sys_profil(caddr_t samples, size_t size, \ u_long offset, u_int scale); } #ifdef KTRACE -45 STD { int sys_ktrace(char *fname, int ops, int facs, \ - int pid); } +45 STD { int sys_ktrace(const char *fname, int ops, \ + int facs, int pid); } #else 45 UNIMPL ktrace #endif -46 STD { int sys_sigaction(int signum, struct sigaction *nsa, \ +46 STD { int sys_sigaction(int signum, \ + const struct sigaction *nsa, \ struct sigaction *osa); } 47 STD { gid_t sys_getgid(void); } 48 STD { int sys_sigprocmask(int how, sigset_t mask); } 49 STD { int sys___getlogin(char *namebuf, u_int namelen); } -50 STD { int sys_setlogin(char *namebuf); } -51 STD { int sys_acct(char *path); } +50 STD { int sys_setlogin(const char *namebuf); } +51 STD { int sys_acct(const char *path); } 52 STD { int sys_sigpending(void); } -53 STD { int sys_sigaltstack(struct sigaltstack *nss, \ +53 STD { int sys_sigaltstack(const struct sigaltstack *nss, \ struct sigaltstack *oss); } -54 STD { int sys_ioctl(int fd, u_long com, ... caddr_t data); } +54 STD { int sys_ioctl(int fd, \ + u_long com, ... caddr_t data); } 55 COMPAT_12 { int sys_reboot(int opt); } oreboot -56 STD { int sys_revoke(char *path); } -57 STD { int sys_symlink(char *path, char *link); } -58 STD { int sys_readlink(char *path, char *buf, int count); } -59 STD { int sys_execve(char *path, char **argp, \ - char **envp); } +56 STD { int sys_revoke(const char *path); } +57 STD { int sys_symlink(const char *path, \ + const char *link); } +58 STD { int sys_readlink(const char *path, char *buf, \ + int count); } +59 STD { int sys_execve(const char *path, \ + char * const *argp, char * const *envp); } 60 STD { int sys_umask(int newmask); } -61 STD { int sys_chroot(char *path); } +61 STD { int sys_chroot(const char *path); } 62 COMPAT_43 { int sys_fstat(int fd, struct ostat *sb); } ofstat 63 COMPAT_43 { int sys_getkerninfo(int op, char *where, int *size, \ int arg); } ogetkerninfo @@ -148,13 +158,15 @@ 78 STD { int sys_mincore(caddr_t addr, size_t len, \ char *vec); } 79 STD { int sys_getgroups(u_int gidsetsize, gid_t *gidset); } -80 STD { int sys_setgroups(u_int gidsetsize, gid_t *gidset); } +80 STD { int sys_setgroups(u_int gidsetsize, \ + const gid_t *gidset); } 81 STD { int sys_getpgrp(void); } 82 STD { int sys_setpgid(int pid, int pgid); } 83 STD { int sys_setitimer(u_int which, \ - struct itimerval *itv, struct itimerval *oitv); } + const struct itimerval *itv, \ + struct itimerval *oitv); } 84 COMPAT_43 { int sys_wait(void); } owait -85 STD { int sys_swapon(char *name); } +85 STD { int sys_swapon(const char *name); } 86 STD { int sys_getitimer(u_int which, \ struct itimerval *itv); } 87 COMPAT_43 { int sys_gethostname(char *hostname, u_int len); } \ @@ -171,18 +183,20 @@ 95 STD { int sys_fsync(int fd); } 96 STD { int sys_setpriority(int which, int who, int prio); } 97 STD { int sys_socket(int domain, int type, int protocol); } -98 STD { int sys_connect(int s, caddr_t name, int namelen); } -99 COMPAT_43 { int sys_accept(int s, caddr_t name, int *anamelen); } \ - oaccept +98 STD { int sys_connect(int s, const struct sockaddr *name, \ + int namelen); } +99 COMPAT_43 { int sys_accept(int s, caddr_t name, \ + int *anamelen); } oaccept 100 STD { int sys_getpriority(int which, int who); } 101 COMPAT_43 { int sys_send(int s, caddr_t buf, int len, \ int flags); } osend 102 COMPAT_43 { int sys_recv(int s, caddr_t buf, int len, \ int flags); } orecv 103 STD { int sys_sigreturn(struct sigcontext *sigcntxp); } -104 STD { int sys_bind(int s, caddr_t name, int namelen); } +104 STD { int sys_bind(int s, const struct sockaddr *name, \ + int namelen); } 105 STD { int sys_setsockopt(int s, int level, int name, \ - caddr_t val, int valsize); } + const void *val, int valsize); } 106 STD { int sys_listen(int s, int backlog); } 107 OBSOL vtimes 108 COMPAT_43 { int sys_sigvec(int signum, struct sigvec *nsv, \ @@ -205,37 +219,39 @@ struct timezone *tzp); } 117 STD { int sys_getrusage(int who, struct rusage *rusage); } 118 STD { int sys_getsockopt(int s, int level, int name, \ - caddr_t val, int *avalsize); } + void *val, int *avalsize); } 119 OBSOL resuba -120 STD { ssize_t sys_readv(int fd, struct iovec *iovp, \ +120 STD { ssize_t sys_readv(int fd, const struct iovec *iovp, \ u_int iovcnt); } -121 STD { ssize_t sys_writev(int fd, struct iovec *iovp, \ - u_int iovcnt); } -122 STD { int sys_settimeofday(struct timeval *tv, \ - struct timezone *tzp); } -123 STD { int sys_fchown(int fd, int uid, int gid); } +121 STD { ssize_t sys_writev(int fd, \ + const struct iovec *iovp, u_int iovcnt); } +122 STD { int sys_settimeofday(const struct timeval *tv, \ + const struct timezone *tzp); } +123 STD { int sys_fchown(int fd, uid_t uid, gid_t gid); } 124 STD { int sys_fchmod(int fd, int mode); } 125 COMPAT_43 { int sys_recvfrom(int s, caddr_t buf, size_t len, \ int flags, caddr_t from, int *fromlenaddr); } \ orecvfrom -126 STD { int sys_setreuid(int ruid, int euid); } -127 STD { int sys_setregid(int rgid, int egid); } -128 STD { int sys_rename(char *from, char *to); } +126 STD { int sys_setreuid(uid_t ruid, uid_t euid); } +127 STD { int sys_setregid(gid_t rgid, gid_t egid); } +128 STD { int sys_rename(const char *from, const char *to); } 129 COMPAT_43 { int sys_truncate(char *path, long length); } \ otruncate 130 COMPAT_43 { int sys_ftruncate(int fd, long length); } oftruncate 131 STD { int sys_flock(int fd, int how); } -132 STD { int sys_mkfifo(char *path, int mode); } -133 STD { ssize_t sys_sendto(int s, caddr_t buf, size_t len, \ - int flags, caddr_t to, int tolen); } +132 STD { int sys_mkfifo(const char *path, int mode); } +133 STD { ssize_t sys_sendto(int s, const void *buf, \ + size_t len, int flags, const struct sockaddr *to, \ + int tolen); } 134 STD { int sys_shutdown(int s, int how); } 135 STD { int sys_socketpair(int domain, int type, \ int protocol, int *rsv); } -136 STD { int sys_mkdir(char *path, int mode); } -137 STD { int sys_rmdir(char *path); } -138 STD { int sys_utimes(char *path, struct timeval *tptr); } +136 STD { int sys_mkdir(const char *path, int mode); } +137 STD { int sys_rmdir(const char *path); } +138 STD { int sys_utimes(const char *path, \ + const struct timeval *tptr); } 139 OBSOL 4.2 sigreturn -140 STD { int sys_adjtime(struct timeval *delta, \ +140 STD { int sys_adjtime(const struct timeval *delta, \ struct timeval *olddelta); } 141 COMPAT_43 { int sys_getpeername(int fdes, caddr_t asa, \ int *alen); } ogetpeername @@ -247,8 +263,8 @@ struct ogetrlimit *rlp); } osetrlimit 146 COMPAT_43 { int sys_killpg(int pgid, int signum); } okillpg 147 STD { int sys_setsid(void); } -148 STD { int sys_quotactl(char *path, int cmd, int uid, \ - caddr_t arg); } +148 STD { int sys_quotactl(const char *path, int cmd, \ + int uid, caddr_t arg); } 149 COMPAT_43 { int sys_quota(void); } oquota 150 COMPAT_43 { int sys_getsockname(int fdec, caddr_t asa, \ int *alen); } ogetsockname @@ -262,18 +278,19 @@ 153 UNIMPL 154 UNIMPL #if defined(NFSCLIENT) || defined(NFSSERVER) -155 STD { int sys_nfssvc(int flag, caddr_t argp); } +155 STD { int sys_nfssvc(int flag, void *argp); } #else 155 UNIMPL #endif 156 COMPAT_43 { int sys_getdirentries(int fd, char *buf, \ u_int count, long *basep); } ogetdirentries -157 STD { int sys_statfs(char *path, struct statfs *buf); } +157 STD { int sys_statfs(const char *path, \ + struct statfs *buf); } 158 STD { int sys_fstatfs(int fd, struct statfs *buf); } 159 UNIMPL 160 UNIMPL #if defined(NFSCLIENT) || defined(NFSSERVER) -161 STD { int sys_getfh(char *fname, fhandle_t *fhp); } +161 STD { int sys_getfh(const char *fname, fhandle_t *fhp); } #else 161 UNIMPL getfh #endif @@ -334,14 +351,15 @@ 186 UNIMPL 187 UNIMPL #endif -188 STD { int sys_stat(char *path, struct stat *ub); } +188 STD { int sys_stat(const char *path, struct stat *ub); } 189 STD { int sys_fstat(int fd, struct stat *sb); } -190 STD { int sys_lstat(char *path, struct stat *ub); } -191 STD { long sys_pathconf(char *path, int name); } +190 STD { int sys_lstat(const char *path, struct stat *ub); } +191 STD { long sys_pathconf(const char *path, int name); } 192 STD { long sys_fpathconf(int fd, int name); } 193 UNIMPL 194 STD { int sys_getrlimit(u_int which, struct rlimit *rlp); } -195 STD { int sys_setrlimit(u_int which, struct rlimit *rlp); } +195 STD { int sys_setrlimit(u_int which, \ + const struct rlimit *rlp); } 196 STD { int sys_getdirentries(int fd, char *buf, \ u_int count, long *basep); } 197 STD { caddr_t sys_mmap(caddr_t addr, size_t len, int prot, \ @@ -349,15 +367,17 @@ 198 INDIR { quad_t sys___syscall(quad_t num, ...); } 199 STD { off_t sys_lseek(int fd, int pad, off_t offset, \ int whence); } -200 STD { int sys_truncate(char *path, int pad, off_t length); } +200 STD { int sys_truncate(const char *path, int pad, \ + off_t length); } 201 STD { int sys_ftruncate(int fd, int pad, off_t length); } 202 STD { int sys___sysctl(int *name, u_int namelen, \ void *old, size_t *oldlenp, void *new, \ size_t newlen); } 203 STD { int sys_mlock(caddr_t addr, size_t len); } 204 STD { int sys_munlock(caddr_t addr, size_t len); } -205 STD { int sys_undelete(char *path); } -206 STD { int sys_futimes(int fd, struct timeval *tptr); } +205 STD { int sys_undelete(const char *path); } +206 STD { int sys_futimes(int fd, \ + const struct timeval *tptr); } 207 STD { int sys_getpgid(pid_t pid); } 208 STD { int sys_reboot(int opt, char *bootstr); } 209 STD { int sys_poll(struct pollfd *fds, u_int nfds, \