Re: determining an iso from vnd

"James K. Lowden" <[email protected]>
Newsgroups gmane.os.netbsd.help
Message-ID <[email protected]>
George Georgalis wrote:
> shouldn't we be able to use stat to look up
> the file attributes, like name and path, from the inode?

An inode, like a network node, is a number.  Just as /etc/hosts and DNS
map names to network addresses, just as /etc/services maps names to ports,
so too does a filesystem directory map names to inodes.  The number
doesn't know its name, and, as you know, can have many names.  

That's not to say it can't be done, of course; that's just to say it's a
singly-linked list.  To look up names by number, you'd need a
number-to-name linked list.  I don't know of any OS that maintains such a
list. 

Apple has something similar: if you create an "alias" in the OS X Finder
and then rename the target with mv(1), the alias continues to work.  (The
alias is not a symlink.  file(1) says only that it's empty.)  Cf.
http://www.kernelthread.com/mac/osx/arch_fs.html and look for "Aliases". 

HTH.  

--jkl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.