diff options
Diffstat (limited to 'sys/kern/vfs_vnops.c')
| -rw-r--r-- | sys/kern/vfs_vnops.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index ed2dc6214a45..b273dc8b3604 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -1,4 +1,11 @@ /* + * Copyright (c) UNIX System Laboratories, Inc. All or some portions + * of this file are derived from material licensed to the + * University of California by American Telephone and Telegraph Co. + * or UNIX System Laboratories, Inc. and are reproduced herein with + * the permission of UNIX System Laboratories, Inc. + */ +/* * Copyright (c) 1982, 1986, 1989 Regents of the University of California. * All rights reserved. * @@ -31,7 +38,7 @@ * SUCH DAMAGE. * * from: @(#)vfs_vnops.c 7.33 (Berkeley) 6/27/91 - * $Id: vfs_vnops.c,v 1.2 1993/10/16 15:25:29 rgrimes Exp $ + * $Id: vfs_vnops.c,v 1.4.2.2 1994/05/04 07:55:04 rgrimes Exp $ */ #include "param.h" @@ -54,6 +61,7 @@ struct fileops vnops = * Common code for vnode open operations. * Check permissions, and call the VOP_OPEN or VOP_CREATE routine. */ +int vn_open(ndp, p, fmode, cmode) register struct nameidata *ndp; struct proc *p; @@ -139,6 +147,7 @@ bad: * The read-only status of the file system is checked. * Also, prototype text segments cannot be written. */ +int vn_writechk(vp) register struct vnode *vp; { @@ -167,6 +176,7 @@ vn_writechk(vp) /* * Vnode close call */ +int vn_close(vp, flags, cred, p) register struct vnode *vp; int flags; @@ -186,6 +196,7 @@ vn_close(vp, flags, cred, p) * Package up an I/O request on a vnode into a uio and do it. * [internal interface to file i/o for kernel only] */ +int vn_rdwr(rw, vp, base, len, offset, segflg, ioflg, cred, aresid, p) enum uio_rw rw; struct vnode *vp; @@ -230,6 +241,7 @@ vn_rdwr(rw, vp, base, len, offset, segflg, ioflg, cred, aresid, p) /* * File table vnode read routine. */ +int vn_read(fp, uio, cred) struct file *fp; struct uio *uio; @@ -251,6 +263,7 @@ vn_read(fp, uio, cred) /* * File table vnode write routine. */ +int vn_write(fp, uio, cred) struct file *fp; struct uio *uio; @@ -278,6 +291,7 @@ vn_write(fp, uio, cred) /* * File table vnode stat routine. */ +int vn_stat(vp, sb, p) struct vnode *vp; register struct stat *sb; @@ -300,6 +314,7 @@ vn_stat(vp, sb, p) mode = vap->va_mode; switch (vp->v_type) { case VREG: + case VPROC: mode |= S_IFREG; break; case VDIR: @@ -345,6 +360,7 @@ vn_stat(vp, sb, p) /* * File table vnode ioctl routine. */ +int vn_ioctl(fp, com, data, p) struct file *fp; int com; @@ -376,7 +392,7 @@ vn_ioctl(fp, com, data, p) case VCHR: case VBLK: error = VOP_IOCTL(vp, com, data, fp->f_flag, p->p_ucred, p); - if (error == 0 && com == TIOCSCTTY) { + if (error == 0 && com == TIOCSCTTY && (p->p_session->s_ttyvp != vp)) { p->p_session->s_ttyvp = vp; VREF(vp); } @@ -387,6 +403,7 @@ vn_ioctl(fp, com, data, p) /* * File table vnode select routine. */ +int vn_select(fp, which, p) struct file *fp; int which; @@ -400,6 +417,7 @@ vn_select(fp, which, p) /* * File table vnode close routine. */ +int vn_closefile(fp, p) struct file *fp; struct proc *p; @@ -415,6 +433,7 @@ vn_closefile(fp, p) * - get vp by calling VFS_FHTOVP() macro * - if lockflag lock it with VOP_LOCK() */ +int vn_fhtovp(fhp, lockflag, vpp) fhandle_t *fhp; int lockflag; |
