Subject: Re: funlink() for fun! To: NetBSD Kernel Technical
Discussion List <> From: der Mouse
<mouse@Rodents.Montreal.QC.CA> List: tech-kern Date: 07/11/2003
16:48:54 >>> If all one is trying to do is flesh out the set of
f*() system >>> calls which have file descriptor parameters to
make it orthogonal >>> to the set which have pathname parameters
then >> shouldn't do funlink() in this form in the first place,
as >> unlink() is not an operation on a file but an operation on
a link to >> a file. > But that's the whole point of funlink()
(and perhaps even some of the > other f*() calls, such as
fchdir()) -- turn an operation on a file > into an operation on
a filename (i.e. a link to a file).  Not quite.  chdir()
operates on a process and a directory; the pathname is necessary
only to identify the directory.  It could equally well identify
the directory by a file descriptor open on it, and that's
exactly what fchdir() does.  truncate() operates on a file; the
pathname is used merely to find the desired file.