Subject: Re: funlink() for fun!
To: NetBSD Kernel Technical Discussion List <tech-kern@NetBSD.ORG>
From: Bill Studenmund <>
List: tech-kern
Date: 07/15/2003 12:00:19
On Mon, 14 Jul 2003, Greg A. Woods wrote:

> [ On Monday, July 14, 2003 at 18:34:27 (+0200), Matthias Buelow wrote: ]
> >  Open(2) would then take this identifier to
> > actually open the file, not a pathname.
> We already have fhopen(2), fhstat(2), and fhstatfs().
> Of course these calls (including getfh()) are currently restricted to
> the superuser because they have not had the necessary ACL semantics
> defined for them.
> We are missing at least fhchdir(2) (though for the superuser this can be
> emulated with, for example:  fchdir(fhopen(getfh(".")))

The reason we have the three fh calls we do is because when I created
them, I didn't see any need for anything else. Once we have fhopen(2), we
have all of the fxx(2) calls. fhstat(2) and fhstatfs(2) are two calls
that made sense to be usable w/o having to open the file (say if it's a
device :-) . All the others were ones where it looked like it was better
to have the file open, or ones where it didn't seem fundamentally
important enough to have a syscall when you could just fhopen() then

Take care,