readdir and d_ino set to 0

Chris Johns chrisj@rtems.org
Sat Sep 5 16:14:00 GMT 2009


Eric Blake wrote:
> 
> According to Eric Norum on 9/3/2009 7:00 PM:
>> If I recall my Unix V7 code correctly, I think that inode 0 was reserved
>> for holding a list of bad blocks.  Of course if your disk had a bad
>> block that was *in* the inode table you were pretty much out of luck.....
> 
> Also, modern-day BSD union mounts read all the entries from several layers
> of directories, sort them, then discard duplicate names by changing d_ino
> to 0.  In other words, there are still live systems where readdir returns
> such dead entries.
> 

Many thanks. I will keep clear of 0 as an ino number.

Regards
Chris



More information about the Newlib mailing list