d_name '.'
d_reclen:12 strlen(d_name):1
d_name '..'
d_reclen:16 strlen(d_name):2
d_name 'lost+found'
d_reclen:24 strlen(d_name):10
d_name 'tmp'
d_reclen:16 strlen(d_name):3
d_name 'var'
d_reclen:16 strlen(d_name):3
d_name 'etc'
d_reclen:16 strlen(d_name):3
[snipped]
d_reclen is *very* different from the strlen of the entry. I would expect
d_reclen to be equal to the strlen result. d_recelen seems to return the
number of bytes of allocation in the directory file, these are multiple
of 4 . 32 bits INTS.
In the GNU C_library in the function getcwd d_reclen (d_namelen) is used
to build the pathname which sometimes give odd results i.e. somewhere in a
mounted NCP or Samba tree.
If one uses 'less' or 'vi' or '/bin/pwd' these programs complain that they
are unable to find the current working directory.
Regards
Kees
PS: I tried Alan Cox before but "It's on his queue" so may take a while
before he is able to look at it. :-)
-
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/