summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2007-02-08 16:34:40 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2007-02-08 16:34:40 +0000
commitada7dd7d714f842345d1ddbf90b1df5abe592dbb (patch)
tree38c6c74406482a43d328ffa7dfff2435fb6d6a01
parenta3249c62acbbf240c238c1f5237e1e50aa465882 (diff)
g/c __DTF_READALL. It was a flag to the internal __opendir2() but
is never set now that the unionfs support has been removed from readdir(). OK pedro@
-rw-r--r--include/dirent.h3
-rw-r--r--lib/libc/gen/readdir.c6
2 files changed, 3 insertions, 6 deletions
diff --git a/include/dirent.h b/include/dirent.h
index 6360ab89147..7565be1ca7d 100644
--- a/include/dirent.h
+++ b/include/dirent.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: dirent.h,v 1.16 2006/04/01 18:06:59 otto Exp $ */
+/* $OpenBSD: dirent.h,v 1.17 2007/02/08 16:34:38 millert Exp $ */
/* $NetBSD: dirent.h,v 1.9 1995/03/26 20:13:37 jtc Exp $ */
/*-
@@ -77,7 +77,6 @@ typedef struct _dirdesc {
/* flags for opendir2 */
#define DTF_NODUP 0x0002 /* don't return duplicate names */
-#define __DTF_READALL 0x0008 /* everything has been read */
#ifndef NULL
#ifdef __GNUG__
diff --git a/lib/libc/gen/readdir.c b/lib/libc/gen/readdir.c
index 180ca35fe21..b028c822396 100644
--- a/lib/libc/gen/readdir.c
+++ b/lib/libc/gen/readdir.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: readdir.c,v 1.10 2005/08/08 08:05:34 espie Exp $ */
+/* $OpenBSD: readdir.c,v 1.11 2007/02/08 16:34:39 millert Exp $ */
/*
* Copyright (c) 1983, 1993
* The Regents of the University of California. All rights reserved.
@@ -44,11 +44,9 @@ readdir(DIR *dirp)
for (;;) {
if (dirp->dd_loc >= dirp->dd_size) {
- if (dirp->dd_flags & __DTF_READALL)
- return (NULL);
dirp->dd_loc = 0;
}
- if (dirp->dd_loc == 0 && !(dirp->dd_flags & __DTF_READALL)) {
+ if (dirp->dd_loc == 0) {
dirp->dd_size = getdirentries(dirp->dd_fd,
dirp->dd_buf, dirp->dd_len, &dirp->dd_seek);
if (dirp->dd_size <= 0)