stat() call on a mounted directory point

ted persky ted at nih-csl.UUCP
Wed Dec 13 05:54:32 AEST 1989


Here's a strange occurrence that's happening on several
of our machines here.  When I issue a stat() call on
any directory which happens to be a mount point for
a partition (as indicated by 'df'), the inode number
that comes back is '2', which is identical to the
inode of the root directory.  'ls -di' indicates the
same thing.  Why doesn't it give you the actual inode
of the directory?  For instance, a stat() of /usr will
return '2' for the inode.  Issuing an 'ls -il /' gives
you the actual inode number of /usr, which is what I want
stat() to do.

Sincerely,

Ted Persky

P.S. E-mail would be appreciated.  This is kind of urgent.
-- 
	Ted Persky			phone: (301) 496-2963
	Building 12A, Room 2031		uucp: uunet!nih-csl!ted
	National Institutes of Health	Internet: ted at alw.nih.gov
	Bethesda, MD 20892



More information about the Comp.unix.wizards mailing list