Joerg Sonnenberger wrote:
On Wed, Jul 26, 2006 at 02:55:00PM +0530, Karthik Subramanian wrote:I was fooling around a little with getdents (yes, I know that I shouldn't be using getdents!) and found that the getdents manpage happened to say this about struct dirent:Yeah, you shouldn't :-)The data in the buffer is a series of dirent structures each containing the following entries: u_int32_t d_fileno; u_int16_t d_reclen; u_int8_t d_type; u_int8_t d_namlen; char d_name[MAXNAMELEN + 1]; /* see below */ The d_fileno entry is a number which is unique for each distinct file in the filesystem. Files that are linked by hard links (see link(2)) have the same d_fileno. The d_reclen entry is the length, in bytes, of the directory record.Yeah, this is outdated. I'm seriously thinking about just eliminiating this. Hm. We even have a partly outdated comment on sys/dirent.h...
could you please update these documents to reflect reality? i guess it's just removing d_reclen (and maybe adding the macro to calculate the length), but i'm not exactly sure. thanks simon -- Serve - BSD +++ RENT this banner advert +++ ASCII Ribbon /"\ Work - Mac +++ space for low €€€ NOW!1 +++ Campaign \ / Party Enjoy Relax | http://dragonflybsd.org Against HTML \ Dude 2c 2 the max ! http://golden-apple.biz Mail + News / \
signature.asc
Description: OpenPGP digital signature
