Re: struct dirent in Linux 2.0

David A Rusling (rusling@linux.reo.dec.com)
Tue, 18 Feb 1997 10:36:41 +0000


> > >
> > > Unfortunately Linux currently defines just
> > >
> > > long d_ino;
> > > __kernel_off_t d_off;
> > > unsigned short d_reclen;
> > > char d_name[256]; /* We must not include limits.h! */
> > >

Hmm, for one it's not 64 bit safe. Digital Unix (which does claim to be POSIX etc
compliant) defines d_ino as an ino_t which is a uint_t which, in turn (bear with
me) is a 'unsigned int', voila, it's 32 bits long. Happily the ext2 file definition
(in include/linux/ext2_fs.h) gets it right (its an __u32)...

Dave

----------------------------------------------------------------------
David A Rusling Principal Engineer
European Semiconductor Applications Digital Equipment Co Ltd.,
Engineering PO Box 121,
Imperial Way,
Worton Grange
Reading RG2 0TU
Linux, Alpha, StrongArm, PCI Tel: UK-(0)1734-204380
Fax: UK-(0)1734-203133
----------------------------------------------------------------------