summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libc/sys/getdirentries.25
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libc/sys/getdirentries.2 b/lib/libc/sys/getdirentries.2
index e41581625a4..3002ddbc169 100644
--- a/lib/libc/sys/getdirentries.2
+++ b/lib/libc/sys/getdirentries.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: getdirentries.2,v 1.19 2005/06/18 18:09:42 millert Exp $
+.\" $OpenBSD: getdirentries.2,v 1.20 2007/02/09 14:41:54 otto Exp $
.\" $NetBSD: getdirentries.2,v 1.7 1995/10/12 15:40:50 jtc Exp $
.\"
.\" Copyright (c) 1989, 1991, 1993
@@ -168,7 +168,8 @@ while ((nbytes = getdirentries(fd, buf, bufsize, &base)) > 0) {
cp = buf;
while (cp < ebuf) {
dp = (struct dirent *)cp;
- printf("%s\en", dp->d_name);
+ if (dp->d_fileno != 0)
+ printf("%s\en", dp->d_name);
cp += dp->d_reclen;
}
}