readdir.2: Fix struct old_linux_dirent in accordance with current definition

Signed-off-by: Eugene Syromyatnikov <evgsyr@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Eugene Syromyatnikov 2018-09-19 19:12:31 +02:00 committed by Michael Kerrisk
parent 7831908942
commit 85722724a0
1 changed files with 8 additions and 6 deletions

View File

@ -64,22 +64,24 @@ structure is read.
.PP
The
.I old_linux_dirent
structure is declared as follows:
structure is declared (privately in Linux kernel file
.BR fs/readdir.c )
as follows:
.PP
.in +4n
.EX
struct old_linux_dirent {
long d_ino; /* inode number */
off_t d_off; /* offset to this \fIold_linux_dirent\fP */
unsigned short d_reclen; /* length of this \fId_name\fP */
char d_name[NAME_MAX+1]; /* filename (null-terminated) */
unsigned long d_ino; /* inode number */
unsigned long d_offset; /* offset to this \fIold_linux_dirent\fP */
unsigned short d_namlen; /* length of this \fId_name\fP */
char d_name[1]; /* filename (null-terminated) */
}
.EE
.in
.PP
.I d_ino
is an inode number.
.I d_off
.I d_offset
is the distance from the start of the directory to this
.IR old_linux_dirent .
.I d_reclen