diff options
author | Matthew Dempsky <matthew@cvs.openbsd.org> | 2011-07-09 05:31:27 +0000 |
---|---|---|
committer | Matthew Dempsky <matthew@cvs.openbsd.org> | 2011-07-09 05:31:27 +0000 |
commit | bf12f7af211fc45839621453a1a6d8280a5895a9 (patch) | |
tree | f2935ea06797ba536c605e9dc03d75808860814b /sys | |
parent | 0504a9ca516d0d7a35f116f9402b0c85f30ee387 (diff) |
More syscalls.master cleanup:
sys_osigaltstack() is 7 years old and no longer needed; all glory to
the sys_sigaltstack()!
sys_ogetdirentries() is about 9 months old, but still acceptable
within our release cycle; move from STD to COMPAT_48 to make this
clearer for tedu@ next year.
sys_sbrk() and sys_sstk() are completely obsolete: all they do is
return ENOSYS.
ok guenther@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_sig.c | 46 | ||||
-rw-r--r-- | sys/kern/syscalls.conf | 4 | ||||
-rw-r--r-- | sys/kern/syscalls.master | 11 | ||||
-rw-r--r-- | sys/kern/vfs_syscalls.c | 4 | ||||
-rw-r--r-- | sys/uvm/uvm_mmap.c | 40 |
5 files changed, 11 insertions, 94 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index c0b5f18dc3f..97870a3dff8 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sig.c,v 1.124 2011/07/07 18:11:24 art Exp $ */ +/* $OpenBSD: kern_sig.c,v 1.125 2011/07/09 05:31:26 matthew Exp $ */ /* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */ /* @@ -470,50 +470,6 @@ sys_sigsuspend(struct proc *p, void *v, register_t *retval) return (EINTR); } -/* ARGSUSED */ -int -sys_osigaltstack(struct proc *p, void *v, register_t *retval) -{ - struct sys_osigaltstack_args /* { - syscallarg(const struct osigaltstack *) nss; - syscallarg(struct osigaltstack *) oss; - } */ *uap = v; - struct osigaltstack ss; - const struct osigaltstack *nss; - struct osigaltstack *oss; - int error; - - nss = SCARG(uap, nss); - oss = SCARG(uap, oss); - - if (oss) { - ss.ss_sp = p->p_sigstk.ss_sp; - ss.ss_size = p->p_sigstk.ss_size; - ss.ss_flags = p->p_sigstk.ss_flags; - if ((error = copyout(&ss, oss, sizeof(ss)))) - return (error); - } - if (nss == NULL) - return (0); - error = copyin(nss, &ss, sizeof(ss)); - if (error) - return (error); - if (p->p_sigstk.ss_flags & SS_ONSTACK) - return (EPERM); - if (ss.ss_flags & ~SS_DISABLE) - return (EINVAL); - if (ss.ss_flags & SS_DISABLE) { - p->p_sigstk.ss_flags = ss.ss_flags; - return (0); - } - if (ss.ss_size < MINSIGSTKSZ) - return (ENOMEM); - p->p_sigstk.ss_sp = ss.ss_sp; - p->p_sigstk.ss_size = ss.ss_size; - p->p_sigstk.ss_flags = ss.ss_flags; - return (0); -} - int sys_sigaltstack(struct proc *p, void *v, register_t *retval) { diff --git a/sys/kern/syscalls.conf b/sys/kern/syscalls.conf index 577afe4bbe7..f021201247a 100644 --- a/sys/kern/syscalls.conf +++ b/sys/kern/syscalls.conf @@ -1,11 +1,11 @@ -# $OpenBSD: syscalls.conf,v 1.12 2011/07/09 00:10:51 deraadt Exp $ +# $OpenBSD: syscalls.conf,v 1.13 2011/07/09 05:31:26 matthew 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="" +compatopts="compat_48" libcompatopts="" switchname="sysent" diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index c8e8710ef01..ac09479bf36 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -1,4 +1,4 @@ -; $OpenBSD: syscalls.master,v 1.115 2011/07/09 00:18:06 deraadt Exp $ +; $OpenBSD: syscalls.master,v 1.116 2011/07/09 05:31:26 matthew Exp $ ; $NetBSD: syscalls.master,v 1.32 1996/04/23 10:24:21 mycroft Exp $ ; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 @@ -132,8 +132,7 @@ 51 UNIMPL acct #endif 52 STD { int sys_sigpending(void); } -53 STD { int sys_osigaltstack(const struct osigaltstack *nss, \ - struct osigaltstack *oss); } +53 OBSOL osigaltstack 54 STD { int sys_ioctl(int fd, \ u_long com, ... void *data); } 55 STD { int sys_reboot(int opt); } @@ -153,8 +152,8 @@ 66 STD { int sys_vfork(void); } 67 OBSOL vread 68 OBSOL vwrite -69 STD { int sys_sbrk(int incr); } -70 STD { int sys_sstk(int incr); } +69 OBSOL sbrk +70 OBSOL sstk 71 OBSOL ommap 72 OBSOL vadvise 73 STD { int sys_munmap(void *addr, size_t len); } @@ -327,7 +326,7 @@ struct rlimit *rlp); } 195 STD { int sys_setrlimit(int which, \ const struct rlimit *rlp); } -196 STD { int sys_ogetdirentries(int fd, char *buf, \ +196 COMPAT_48 { int sys_getdirentries(int fd, char *buf, \ int count, long *basep); } 197 STD { void *sys_mmap(void *addr, size_t len, int prot, \ int flags, int fd, long pad, off_t pos); } diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 9b1bcf4f641..b3ea6b28e85 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_syscalls.c,v 1.172 2011/07/09 01:28:48 matthew Exp $ */ +/* $OpenBSD: vfs_syscalls.c,v 1.173 2011/07/09 05:31:26 matthew Exp $ */ /* $NetBSD: vfs_syscalls.c,v 1.71 1996/04/23 10:29:02 mycroft Exp $ */ /* @@ -2731,7 +2731,7 @@ sys_getdirentries(struct proc *p, void *v, register_t *retval) } int -sys_ogetdirentries(struct proc *p, void *v, register_t *retval) +compat_48_sys_getdirentries(struct proc *p, void *v, register_t *retval) { struct sys_getdirentries_args /* { syscallarg(int) fd; diff --git a/sys/uvm/uvm_mmap.c b/sys/uvm/uvm_mmap.c index 954c2045aaf..a96deed4052 100644 --- a/sys/uvm/uvm_mmap.c +++ b/sys/uvm/uvm_mmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_mmap.c,v 1.86 2011/07/05 09:15:57 oga Exp $ */ +/* $OpenBSD: uvm_mmap.c,v 1.87 2011/07/09 05:31:26 matthew Exp $ */ /* $NetBSD: uvm_mmap.c,v 1.49 2001/02/18 21:19:08 chs Exp $ */ /* @@ -91,44 +91,6 @@ } while (0) /* - * unimplemented VM system calls: - */ - -/* - * sys_sbrk: sbrk system call. - */ - -/* ARGSUSED */ -int -sys_sbrk(struct proc *p, void *v, register_t *retval) -{ -#if 0 - struct sys_sbrk_args /* { - syscallarg(int) incr; - } */ *uap = v; -#endif - - return (ENOSYS); -} - -/* - * sys_sstk: sstk system call. - */ - -/* ARGSUSED */ -int -sys_sstk(struct proc *p, void *v, register_t *retval) -{ -#if 0 - struct sys_sstk_args /* { - syscallarg(int) incr; - } */ *uap = v; -#endif - - return (ENOSYS); -} - -/* * sys_mquery: provide mapping hints to applications that do fixed mappings * * flags: 0 or MAP_FIXED (MAP_FIXED - means that we insist on this addr and |