Xref: utzoo comp.unix.questions:18428 comp.unix.wizards:19761 Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!wuarchive!udel!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.unix.questions,comp.unix.wizards Subject: Re: stat() call on a mounted directory point Keywords: stat,mount,directory Message-ID: <11812@smoke.BRL.MIL> Date: 14 Dec 89 08:06:38 GMT References: <1279@nih-csl.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn) Followup-To: comp.unix.questions Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 16 In article <1279@nih-csl.UUCP> ted@nih-csl.UUCP (ted persky) writes: >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. That's what you're supposed to see; it's part of the semantics of mounting. >Issuing an 'ls -il /' gives you the actual inode number of /usr, which is >what I want stat() to do. That's too bad. "ls" merely reports the inumber stored in its directory entry, and that is not altered when a filesystem is mounted on the inode. >P.S. E-mail would be appreciated. This is kind of urgent. It can't be TOO urgent since UNIX has always worked like that.