summaryrefslogtreecommitdiff
path: root/sys/compat/sunos/sunos_misc.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-10-31 10:56:12 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-10-31 10:56:12 +0000
commit5e52cf2a7aad908f4756bbb6dccd325286680816 (patch)
tree84c625b8c6ffcd9e3f1628e993a4da2fd08666f6 /sys/compat/sunos/sunos_misc.c
parenteb3c95f0ae90f74717078aa9acd8090ffe69aed3 (diff)
There is no need to fake handling of /dev/zero here. The vm system ultrix/ultrix_misc.c sunos/sunos_misc.c
does this automagically (and has done it for ages).
Diffstat (limited to 'sys/compat/sunos/sunos_misc.c')
-rw-r--r--sys/compat/sunos/sunos_misc.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/sys/compat/sunos/sunos_misc.c b/sys/compat/sunos/sunos_misc.c
index bf09360cb49..cb4a962dad5 100644
--- a/sys/compat/sunos/sunos_misc.c
+++ b/sys/compat/sunos/sunos_misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sunos_misc.c,v 1.28 2001/10/26 12:03:27 art Exp $ */
+/* $OpenBSD: sunos_misc.c,v 1.29 2001/10/31 10:56:10 art Exp $ */
/* $NetBSD: sunos_misc.c,v 1.65 1996/04/22 01:44:31 christos Exp $ */
/*
@@ -456,15 +456,12 @@ sunos_sys_getdents(p, v, retval)
int
sunos_sys_mmap(p, v, retval)
- register struct proc *p;
+ struct proc *p;
void *v;
register_t *retval;
{
- register struct sunos_sys_mmap_args *uap = v;
+ struct sunos_sys_mmap_args *uap = v;
struct sys_mmap_args ouap;
- register struct filedesc *fdp;
- register struct file *fp;
- register struct vnode *vp;
/*
* Verify the arguments.
@@ -488,20 +485,6 @@ sunos_sys_mmap(p, v, retval)
SCARG(&ouap, fd) = SCARG(uap, fd);
SCARG(&ouap, pos) = SCARG(uap, pos);
- /*
- * Special case: if fd refers to /dev/zero, map as MAP_ANON. (XXX)
- * XXXART - this is probably completly unnecessary. mmap deals with
- * XXXART - this just fine.
- */
- fdp = p->p_fd;
- if ((fp = fd_getfile(fdp, SCARG(&ouap, fd))) != NULL && /*XXX*/
- fp->f_type == DTYPE_VNODE && /*XXX*/
- (vp = (struct vnode *)fp->f_data)->v_type == VCHR && /*XXX*/
- iszerodev(vp->v_rdev)) { /*XXX*/
- SCARG(&ouap, flags) |= MAP_ANON;
- SCARG(&ouap, fd) = -1;
- }
-
return (sys_mmap(p, &ouap, retval));
}