From b127fae40530898bf3a5af68c7dd586d2315ec17 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Mon, 8 Nov 1999 03:32:15 +0000 Subject: [PATCH] Add a vnode fo_stat() entry point. --- sys/kern/vfs_vnops.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 242c6969a14..663897f9544 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;