The expected traditional behaviour of readdir() is to return the inode
number of the underlying filesystem, not the mount point. This is true on
BSD and Solaris as well as Linux, and is permitted by POSIX. POSIX doesn't
allow d_ino to be random because it is specified be the file's serial
number (i.e. inode).

The POSIX spec implies that ls(1) should return the same inode number that
stat(2) does, which is not entirely sensible since that would cause
unhelpful results for symbolic links. BSD ls(1) prints the inode number
from lstat(2). Solaris ls(1) prints the inode number from readdir().

Tony.
-- 
f.anthony.n.finch  <[EMAIL PROTECTED]>  http://dotat.at/
VIKING NORTH UTSIRE: EASTERLY 4 OR 5, INCREASING 6 OR 7 AT TIMES IN SOUTH,
BACKING NORTHEASTERLY LATER. ROUGH BECOMING MODERATE. SQUALLY SHOWERS.
MODERATE OR GOOD.



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to