[Top][All Lists]

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

Re: making GNU ls -i (--inode) work around the linux readdir bug

From: Jim Meyering
Subject: Re: making GNU ls -i (--inode) work around the linux readdir bug
Date: Mon, 07 Jul 2008 18:21:27 +0200

Jim Meyering <address@hidden> wrote:
> Ian Jackson <address@hidden> wrote:
>> It's the permitted by the specs
> The old POSIX spec permitted anything.
> The soon-to-be-current version of POSIX has new wording:
>     The value of the structure's d_ino member shall be set to the file
>     serial number of the file named by the d_name member.
> Since "file serial number" is defined, and later associated with
> stat.st_ino, that might be enough to cause trouble.  However, I doubt
> the austin group realized the implications when they wrote that.

BTW, here's part of the rationale for readdir, from a recent POSIX draft:

  When returning a directory entry for the root of a mounted file system,
  some historical implementations of readdir() returned the file serial
  number of the underlying mount point, rather than of the root of the
  mounted file system. This behavior is considered to be a bug, since the
  underlying file serial number has no significance to applications.

They didn't realize the extent of the problem.
Note that this is only "rationale", so it doesn't immediately
render affected systems non-conforming.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]