Subject: Re: Large inodes for ffs
To: Bill Studenmund <wrstuden@nas.nasa.gov>
From: Chris G. Demetriou <cgd@netbsd.org>
List: tech-kern
Date: 03/24/1999 16:38:34
Bill Studenmund <wrstuden@nas.nasa.gov> writes:
> Why is the declaration (in syscalls.master) "int sys_fcntl(int fd, int
> cmd, ... void *arg);" - the dots make it look like it's varyarg'd when it
> isn't.

As noted earlier, it's kinda because "arg is ignored," but, really,
worse, because "arg is optional."

In terms of why it looks like that in syscalls.master, it's because:

	* the args structure needs to know about the optional
	  argument, but

	* the syscall lint stub, which is automatically generated from
	  a file derived from syscalls.master, needs to know that
	  the last argument is entirely optional.


In reality, it _is_ varargs, but handling it is done with the
knowledge and hack.  since it's just that one extra argument, All Will
Turn Out OK.


> More in a reply to your earlier message. :-)

Is this something you've not sent yet, or that i have missed?  8-)



cgd
-- 
Chris Demetriou - cgd@netbsd.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.