lkml.org 
[lkml]   [1999]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [question]
Date
From
In message <Pine.LNX.4.05.9901190015240.26536-100000@schoen3.schoen.nl>, 
kees w
rites:
+-----
| Hello Friends,
| I'm puzzled by the returned data of the 'readdir' call. The dirent
| structure has a d_reclen entry. If I run a small C program under 2.0.36
| which returns the d_reclen of the root directory entries I get:
+--->8

d_reclen != d_namelen

d_reclen is the size of the directory entry. This includes the size of the
inode number and potentially any unused space after the entry (from removed
entries). It's there so directory entries can be read efficiently by
skipping the unused entries.

You're probably looking for the d_namelen stuff that BSD directory entries
had but POSIX did not pick up. It's not there. Anyone using d_reclen to
mean the same thing is broken.

--
brandon s. allbery [os/2][linux][solaris][japh] allbery@kf8nh.apk.net
system administrator [WAY too many hats] allbery@ece.cmu.edu
carnegie mellon / electrical and computer engineering KF8NH
We are Linux. Resistance is an indication that you missed the point.



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.075 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site