diff options
author | peter <peter@FreeBSD.org> | 1999-11-08 03:32:15 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1999-11-08 03:32:15 +0000 |
commit | 2b764c6970a4a964de10e3d7e9ead44abe02b58d (patch) | |
tree | 798d7c7e6c95942fd2c7e026783e7525ce0d2122 | |
parent | be8eba35406cc6d689af2b06690b08bea32aec04 (diff) | |
download | FreeBSD-src-2b764c6970a4a964de10e3d7e9ead44abe02b58d.zip FreeBSD-src-2b764c6970a4a964de10e3d7e9ead44abe02b58d.tar.gz |
Add a vnode fo_stat() entry point.
-rw-r--r-- | sys/kern/vfs_vnops.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 242c696..663897f 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -60,11 +60,12 @@ static int vn_read __P((struct file *fp, struct uio *uio, struct ucred *cred, int flags, struct proc *p)); static int vn_poll __P((struct file *fp, int events, struct ucred *cred, struct proc *p)); +static int vn_statfile __P((struct file *fp, struct stat *sb, struct proc *p)); static int vn_write __P((struct file *fp, struct uio *uio, struct ucred *cred, int flags, struct proc *p)); struct fileops vnops = - { vn_read, vn_write, vn_ioctl, vn_poll, vn_closefile }; + { vn_read, vn_write, vn_ioctl, vn_poll, vn_statfile, vn_closefile }; /* * Common code for vnode open operations. @@ -371,6 +372,17 @@ vn_write(fp, uio, cred, flags, p) /* * File table vnode stat routine. */ +static int +vn_statfile(fp, sb, p) + struct file *fp; + struct stat *sb; + struct proc *p; +{ + struct vnode *vp = (struct vnode *)fp->f_data; + + return vn_stat(vp, sb, p); +} + int vn_stat(vp, sb, p) struct vnode *vp; |