Subject: Re: CVS commit: syssrc
To: Jaromir Dolecek <jdolecek@netbsd.org>
From: Luke Mewburn <lukem@wasabisystems.com>
List: source-changes
Date: 04/08/2001 13:19:44
On Sat, Apr 07, 2001 at 12:00:58PM +0300, Jaromir Dolecek wrote:
> Module Name:	syssrc
> Committed By:	jdolecek
> Date:		Sat Apr  7 09:00:58 UTC 2001
> 
> Modified Files:
> 	syssrc/sys/compat/common: vfs_syscalls_12.c vfs_syscalls_43.c
> 	syssrc/sys/kern: kern_descrip.c sys_socket.c vfs_vnops.c
> 	syssrc/sys/sys: file.h socketvar.h vnode.h
> 
> Log Message:
> Add new 'stat' fileop and call the stat function via f_ops rather
> than directly.
> For compat syscalls, also add necessary FILE_USE()/FILE_UNUSE().
> Now that soo_stat() gets a proc arg, pass it on to usrreq function.

Hi Jaromir.

I notice that FreeBSD had done this a while ago.

One question; is there any reason why fo_stat is declared as:
	int (*fo_stat)	(void *fdata, struct stat *sp, struct proc *p);
instead of
	int (*fo_stat)	(struct file *fp, struct stat *sp, struct proc *p);
?

I.e, why is the first argument `void *' instead of `struct file *',
which is what all the other struct fileops {} items have (and is also
the way FreeBSD implements fo_stat)?

Luke.

PS: I noticed this because in my integration of the kqueue stuff I've
added an fo_kqfilter element ;-)