diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-10-31 10:56:12 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-10-31 10:56:12 +0000 |
commit | 5e52cf2a7aad908f4756bbb6dccd325286680816 (patch) | |
tree | 84c625b8c6ffcd9e3f1628e993a4da2fd08666f6 /sys/compat/ultrix/ultrix_misc.c | |
parent | eb3c95f0ae90f74717078aa9acd8090ffe69aed3 (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/ultrix/ultrix_misc.c')
-rw-r--r-- | sys/compat/ultrix/ultrix_misc.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/sys/compat/ultrix/ultrix_misc.c b/sys/compat/ultrix/ultrix_misc.c index c17a4ffb185..f6885c3887b 100644 --- a/sys/compat/ultrix/ultrix_misc.c +++ b/sys/compat/ultrix/ultrix_misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ultrix_misc.c,v 1.20 2001/10/26 12:03:27 art Exp $ */ +/* $OpenBSD: ultrix_misc.c,v 1.21 2001/10/31 10:56:11 art Exp $ */ /* $NetBSD: ultrix_misc.c,v 1.23 1996/04/07 17:23:04 jonathan Exp $ */ /* @@ -308,15 +308,12 @@ async_daemon(p, v, retval) int ultrix_sys_mmap(p, v, retval) - register struct proc *p; + struct proc *p; void *v; register_t *retval; { - register struct ultrix_sys_mmap_args *uap = v; + struct ultrix_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. @@ -340,18 +337,6 @@ ultrix_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) - */ - 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)); } |