diff options
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/syscalls.conf | 4 | ||||
-rw-r--r-- | sys/kern/syscalls.master | 17 | ||||
-rw-r--r-- | sys/kern/sysv_sem.c | 18 | ||||
-rw-r--r-- | sys/kern/sysv_shm.c | 7 |
4 files changed, 29 insertions, 17 deletions
diff --git a/sys/kern/syscalls.conf b/sys/kern/syscalls.conf index dfe018accce..a3ecd66c8d1 100644 --- a/sys/kern/syscalls.conf +++ b/sys/kern/syscalls.conf @@ -1,11 +1,11 @@ -# $OpenBSD: syscalls.conf,v 1.5 2001/05/16 17:14:35 millert Exp $ +# $OpenBSD: syscalls.conf,v 1.6 2004/05/03 17:38:48 millert Exp $ # $NetBSD: syscalls.conf,v 1.2 1994/10/26 06:45:57 cgd Exp $ sysnames="syscalls.c" sysnumhdr="../sys/syscall.h" syssw="init_sysent.c" sysarghdr="../sys/syscallargs.h" -compatopts="compat_43 compat_09 compat_10 compat_23 compat_25" +compatopts="compat_43 compat_09 compat_10 compat_23 compat_25 compat_35" libcompatopts="" switchname="sysent" diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 27b4f403fcd..f7d6f63b48a 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -1,4 +1,4 @@ -; $OpenBSD: syscalls.master,v 1.68 2004/02/28 19:44:16 miod Exp $ +; $OpenBSD: syscalls.master,v 1.69 2004/05/03 17:38:48 millert Exp $ ; $NetBSD: syscalls.master,v 1.32 1996/04/23 10:24:21 mycroft Exp $ ; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 @@ -419,7 +419,7 @@ 220 COMPAT_23 { int sys___semctl(int semid, int semnum, int cmd, \ union semun *arg); } __osemctl 221 STD { int sys_semget(key_t key, int nsems, int semflg); } -222 STD { int sys_semop(int semid, struct sembuf *sops, \ +222 COMPAT_35 { int sys_semop(int semid, struct sembuf *sops, \ u_int nsops); } 223 OBSOL sys_semconfig #else @@ -448,7 +448,7 @@ 229 COMPAT_23 { int sys_shmctl(int shmid, int cmd, \ struct oshmid_ds *buf); } oshmctl 230 STD { int sys_shmdt(const void *shmaddr); } -231 STD { int sys_shmget(key_t key, int size, int shmflg); } +231 COMPAT_35 { int sys_shmget(key_t key, int size, int shmflg); } #else 228 UNIMPL shmat 229 UNIMPL shmctl @@ -575,3 +575,14 @@ 287 STD { int sys_closefrom(int fd); } 288 STD { int sys_sigaltstack(const struct sigaltstack *nss, \ struct sigaltstack *oss); } +#ifdef SYSVSHM +289 STD { int sys_shmget(key_t key, size_t size, int shmflg); } +#else +289 UNIMPL shmget +#endif +#ifdef SYSVSEM +290 STD { int sys_semop(int semid, struct sembuf *sops, \ + size_t nsops); } +#else +290 UNIMPL semop +#endif diff --git a/sys/kern/sysv_sem.c b/sys/kern/sysv_sem.c index f6024698520..8255a6f0160 100644 --- a/sys/kern/sysv_sem.c +++ b/sys/kern/sysv_sem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sysv_sem.c,v 1.28 2004/03/17 19:54:24 millert Exp $ */ +/* $OpenBSD: sysv_sem.c,v 1.29 2004/05/03 17:38:48 millert Exp $ */ /* $NetBSD: sysv_sem.c,v 1.26 1996/02/09 19:00:25 christos Exp $ */ /* @@ -500,23 +500,23 @@ sys_semop(struct proc *p, void *v, register_t *retval) struct sys_semop_args /* { syscallarg(int) semid; syscallarg(struct sembuf *) sops; - syscallarg(u_int) nsops; + syscallarg(size_t) nsops; } */ *uap = v; #define NSOPS 8 struct sembuf sopbuf[NSOPS]; int semid = SCARG(uap, semid); - u_int nsops = SCARG(uap, nsops); + size_t nsops = SCARG(uap, nsops); struct sembuf *sops; struct semid_ds *semaptr; struct sembuf *sopptr = NULL; struct sem *semptr = NULL; struct sem_undo *suptr = NULL; struct ucred *cred = p->p_ucred; - u_int i, j; + size_t i, j; int do_wakeup, do_undos, error; - DPRINTF(("call to semop(%d, %p, %u)\n", semid, SCARG(uap, sops), - nsops)); + DPRINTF(("call to semop(%d, %p, %lu)\n", semid, SCARG(uap, sops), + (u_long)nsops)); semid = IPCID_TO_IX(semid); /* Convert back to zero origin */ @@ -535,9 +535,9 @@ sys_semop(struct proc *p, void *v, register_t *retval) if (nsops == 0) { *retval = 0; return (0); - } else if (nsops > (u_int)seminfo.semopm) { - DPRINTF(("too many sops (max=%d, nsops=%u)\n", seminfo.semopm, - nsops)); + } else if (nsops > (size_t)seminfo.semopm) { + DPRINTF(("too many sops (max=%d, nsops=%lu)\n", seminfo.semopm, + (u_long)nsops)); return (E2BIG); } diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c index 046c3bc2481..ff614d7655e 100644 --- a/sys/kern/sysv_shm.c +++ b/sys/kern/sysv_shm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sysv_shm.c,v 1.42 2004/04/16 17:55:13 tedu Exp $ */ +/* $OpenBSD: sysv_shm.c,v 1.43 2004/05/03 17:38:48 millert Exp $ */ /* $NetBSD: sysv_shm.c,v 1.50 1998/10/21 22:24:29 tron Exp $ */ /* @@ -384,8 +384,9 @@ shmget_allocate_segment(struct proc *p, } */ *uap, int mode, register_t *retval) { + size_t size; key_t key; - int segnum, size; + int segnum; struct ucred *cred = p->p_ucred; struct shmid_ds *shmseg; struct shm_handle *shm_handle; @@ -457,7 +458,7 @@ sys_shmget(struct proc *p, void *v, register_t *retval) { struct sys_shmget_args /* { syscallarg(key_t) key; - syscallarg(int) size; + syscallarg(size_t) size; syscallarg(int) shmflg; } */ *uap = v; int segnum, mode, error; |