summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libc/gen/directory.327
1 files changed, 11 insertions, 16 deletions
diff --git a/lib/libc/gen/directory.3 b/lib/libc/gen/directory.3
index 0abbe5f..a1ca347 100644
--- a/lib/libc/gen/directory.3
+++ b/lib/libc/gen/directory.3
@@ -94,6 +94,16 @@ The
function
returns the current location associated with the named
.Em directory stream .
+Values returned by
+.Fn telldir
+are good only for the lifetime of the
+.Dv DIR
+pointer,
+.Fa dirp ,
+from which they are derived. If the directory is closed and then
+reopened, prior values returned by
+.Fn telldir
+will no longer be valid.
.Pp
The
.Fn seekdir
@@ -106,22 +116,7 @@ The new position reverts to the one associated with the
.Em directory stream
when the
.Fn telldir
-operation was performed. Values returned by
-.Fn telldir
-are good only for the lifetime of the
-.Dv DIR
-pointer,
-.Fa dirp ,
-from which they are derived.
-If the directory is closed and then reopened, the
-.Fn telldir
-value may be invalidated due to undetected directory compaction.
-It is safe to use a previous
-.Fn telldir
-value immediately after a call to
-.Fn opendir
-and before any calls to
-.Fn readdir .
+operation was performed.
.Pp
The
.Fn rewinddir
OpenPOWER on IntegriCloud