getdents.2: comment out linux_dirent fields with varying location

The location of the fields fater d_name varies according to
the size of d_name.  We can't properly declare them in C;
therefore, put those fields inside a comment.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2008-10-02 13:07:58 +02:00
parent 5df2ee037d
commit 5ff3825e41
1 changed files with 7 additions and 5 deletions

View File

@ -50,7 +50,7 @@ into the buffer pointed to by
.IR dirp .
The argument
.I count
is the size of the memory area.
is specifies the size of that buffer.
.PP
The
.I linux_dirent
@ -62,12 +62,14 @@ struct linux_dirent {
unsigned long d_ino; /* Inode number */
unsigned long d_off; /* Offset to next \fIlinux_dirent\fP */
unsigned short d_reclen; /* Length of this \fIlinux_dirent\fP */
char d_name []; /* Filename (null-terminated) */
char d_name[]; /* Filename (null-terminated) */
/* length is actually (d_reclen \- 2 \-
offsetof(struct linux_dirent, d_name) */
char pad; /* Zero padding byte */
char d_type; /* File type (only since Linux 2.6.4;
offset is (d_reclen \- 1)) */
/*
char pad; // Zero padding byte */
char d_type; // File type (only since Linux 2.6.4;
// offset is (d_reclen \- 1))
*/
}
.fi