tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Fwd: inode open



Begin forwarded message:

From: Adam Burkepile <sadpoti%gmail.com@localhost>
Date: July 16, 2008 2:30:54 PM PDT
To: tech-kern%netbsd.org@localhost
Subject: Re: inode open

On Jul 16, 2008, at 1:34 PM, Jason Thorpe wrote:


On Jul 16, 2008, at 7:47 AM, Matt Thomas wrote:

Besides the fhopen(2) previously mentioned, this isn't available because it would break the security used by unix.


Other Unix-like platforms (Mac OS X) can do this without breaking the Unix security model. We should be able to, too.

Of course, a good starting point for Adam is -- "What do you need this for?"

-- thorpej




Yes, I asked because was searching for the functions to do this and found a webpage that had this information:

Under Mach there were the following system calls for this purpose:

iopen(dev, inode) -- return a filehandle for file inode on device dev.
icreate(dev) -- returns the inode number of a new file on device dev.
istat(dev, inode, statb) -- fill in the statb structure.
iinc(dev,inode) -- increase the disk link count of the file
idec(dev, inode) -- decrease the disk link count (remove file when 0).

and wanted to find an equivalent function(s) in NetBSD.


I need this functionality because the way I was going to implement subfiles is have the basefile inode structure hold a new field, which is the inode number of the "subfile directory". This directory would hold the basefile's subfiles.

So, what I really should of asked, "Is there a way of opening up a directory (not a regular file) based on the inode number, like a special opendir()".



Adam Burkepile




Home | Main Index | Thread Index | Old Index