Deleted Added
full compact
directory.3 (270002) directory.3 (282979)
1.\" Copyright (c) 1983, 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 12 unchanged lines hidden (view full) ---

21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE.
27.\"
28.\" @(#)directory.3 8.1 (Berkeley) 6/4/93
1.\" Copyright (c) 1983, 1991, 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 12 unchanged lines hidden (view full) ---

21.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE.
27.\"
28.\" @(#)directory.3 8.1 (Berkeley) 6/4/93
29.\" $FreeBSD: stable/10/lib/libc/gen/directory.3 270002 2014-08-14 20:20:21Z jhb $
29.\" $FreeBSD: stable/10/lib/libc/gen/directory.3 282979 2015-05-15 15:49:24Z julian $
30.\"
31.Dd July 28, 2014
32.Dt DIRECTORY 3
33.Os
34.Sh NAME
35.Nm opendir ,
36.Nm fdopendir ,
37.Nm readdir ,

--- 224 unchanged lines hidden (view full) ---

262.Fn fdclosedir
263function appeared in
264.Fx 10.0 .
265.Sh BUGS
266The invalidation of
267.Fn telldir
268tokens when calling
269.Fn seekdir
30.\"
31.Dd July 28, 2014
32.Dt DIRECTORY 3
33.Os
34.Sh NAME
35.Nm opendir ,
36.Nm fdopendir ,
37.Nm readdir ,

--- 224 unchanged lines hidden (view full) ---

262.Fn fdclosedir
263function appeared in
264.Fx 10.0 .
265.Sh BUGS
266The invalidation of
267.Fn telldir
268tokens when calling
269.Fn seekdir
270is non-standard.
270is non-standard. This is a compile time option.
271.Pp
272The behaviour of
273.Fn telldir
274and
275.Fn seekdir
276is likely to be wrong if there are parallel unlinks happening
277and the directory is larger than one page.
278There is code to ensure that a
279.Fn seekdir
280to the location given by a
281.Fn telldir
282immediately before the last
283.Fn readdir
284will always set the correct location to return the same value as that last
285.Fn readdir
286performed.
287This is enough for some applications which want to "push back the last entry read" E.g. Samba.
288Seeks back to any other location,
289other than the beginning of the directory,
290may result in unexpected behaviour if deletes are present.
291It is hoped that this situation will be resolved with changes to
292.Fn getdirentries
293and the VFS.