From fdd13acbc4b74497adc4cf3eef65e960e76d94c1 Mon Sep 17 00:00:00 2001 From: fair Date: Fri, 16 Mar 2001 07:58:24 +0000 Subject: [PATCH] Correct typo in ERRORS, and document that getdents(2) can return directory entries that refer to deleted files, all per PR 10567. --- lib/libc/sys/getdents.2 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/libc/sys/getdents.2 b/lib/libc/sys/getdents.2 index e295a514ae91..48ba564402e9 100644 --- a/lib/libc/sys/getdents.2 +++ b/lib/libc/sys/getdents.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: getdents.2,v 1.6 2000/11/21 23:35:10 wiz Exp $ +.\" $NetBSD: getdents.2,v 1.7 2001/03/16 07:58:24 fair Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -83,12 +83,18 @@ Files that are linked by hard links (see .Xr link 2 ) have the same .Fa d_fileno . +If +.Fa d_fileno +is zero, the entry refers to a deleted file. +.Pp The .Fa d_reclen entry is the length, in bytes, of the directory record. +.Pp The .Fa d_name entry contains a null terminated file name. +.Pp The .Fa d_namlen entry specifies the length of the file name excluding the null byte. @@ -125,7 +131,7 @@ Otherwise, -1 is returned and the global variable .Va errno is set to indicate the error. .Sh ERRORS -.Fn gtdents +.Fn getdents will fail if: .Bl -tag -width Er .It Bq Er EBADF