aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/gen/directory.3
Commit message (Collapse)AuthorAgeFilesLines
* directory(3): Add an ERRORS sectionGordon Bergling2020-08-041-2/+72
| | | | | | | | | | | | | | | | | | - Add an ERRORS section for opendir(3) and closedir(3) - Document also the errors of readdir(3), readdir_r(3) and telldir(3) - Convert the code sample into an EXAMPLES section PR: 75711 Submitted by: abc <abc at ai1 dot anchorage dot mtaonline dot net> Reviewed by: 0mp, bcr, jilles Approved by: 0mp, bcr, jilles Obtained from: partial from OpenBSD MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25892 Notes: svn path=/head/; revision=363829
* directory.3: add a STANDARDS sectionAlan Somers2019-05-021-1/+25
| | | | | | | | | | Reviewed by: jilles, ngie MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D20111 Notes: svn path=/head/; revision=347032
* directory(3): add trailing comma after e.g., missed in r318699Enji Cooper2017-05-231-1/+1
| | | | | | | | | | Submitted by: bjk MFC after: 2 weeks MFC with: r318699 Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=318753
* directory(3): delete trailing whitespace and rewrite `E.g.` as `e.g.`Enji Cooper2017-05-231-4/+5
| | | | | | | | Reported by: make manlint Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=318699
* Renumber copyright clause 4Warner Losh2017-02-281-1/+1
| | | | | | | | | | | | Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
* directory(3): Deprecate readdir_r(). Clarify dirent buffers.Jilles Tjoelker2016-08-311-2/+24
| | | | | | | | | | | | | | | | | | | | | | In existing implementations including FreeBSD, there is no reason to use readdir_r() in the common case where potentially multiple threads each list their own directory. Code using readdir() is simpler. What's more, lthough readdir_r() can safely be used on FreeBSD because NAME_MAX is forced to 255, it cannot be used safely on systems where {NAME_MAX} is not fixed. As a concrete example, FAT/NTFS filenames can be up to 255 UTF-16 code units long, which can be up to 765 UTF-8 bytes. Deprecating readdir_r() in POSIX has been proposed in http://www.austingroupbugs.net/view.php?id=696 and glibc wants to deprecate it as well. Reviewed by: ed, wblock MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D7678 Notes: svn path=/head/; revision=305154
* Remove sys/types.hKevin Lo2016-02-191-2/+1
| | | | Notes: svn path=/head/; revision=295797
* Remove the note about seekdir() removing telldir() cookies. That wasJohn Baldwin2015-05-061-7/+1
| | | | | | | | | removed back in r269204. MFC after: 3 days Notes: svn path=/head/; revision=282552
* Tweak seekdir, telldir and readdir so that when htere are deletes going on,Julian Elischer2015-05-051-1/+24
| | | | | | | | | | | | | | as seek to teh last location saved will still work. This is needed for Samba to be able to correctly handle delete requests from windows. This does not completely fix seekdir when deletes are present but fixes the worst of the problems. The real solution must involve some changes to the API for eh VFS and getdirentries(2). Obtained from: Panzura inc MFC after: 1 week Notes: svn path=/head/; revision=282485
* If telldir() is called immediately after a call to seekdir(), POSIXJohn Baldwin2014-07-291-8/+5
| | | | | | | | | | | | | | | | | requires the return value of telldir() to equal the value passed to seekdir(). The current seekdir code with SINGLEUSE enabled breaks this case as each call to telldir() allocates a new cookie. Instead, remove the SINGLEUSE code and change telldir() to look for an existing cookie for the directory's current location rather than always creating a new cookie. CR: https://phabric.freebsd.org/D490 PR: 121656 Reviewed by: jilles MFC after: 1 week Notes: svn path=/head/; revision=269204
* Implement fdclosedir(3) function, which is equivalent to the closedir(3)Pawel Jakub Dawidek2013-08-181-1/+14
| | | | | | | | | | function, but returns directory file descriptor instead of closing it. Submitted by: Mariusz Zaborski <oshogbo@FreeBSD.org> Sponsored by: Google Summer of Code 2013 Notes: svn path=/head/; revision=254499
* Document the behavior (from 4.4-lite) that tokens returned by telldir() areBrooks Davis2012-07-051-2/+15
| | | | | | | | | | single use. Sponsored by: DARPA, AFRL MFC after: 3 days Notes: svn path=/head/; revision=238141
* More accurately document what happens on error.Eitan Adler2012-02-091-3/+6
| | | | | | | | | | PR: docs/127908 Submitted by: Matthew D. Fuller <fullermd@over-yonder.net> Approved by: cperciva MFC after: 1 week Notes: svn path=/head/; revision=231299
* Don't calculate len too early.Pawel Jakub Dawidek2011-03-261-1/+1
| | | | Notes: svn path=/head/; revision=220024
* Follow style(9) in example code and handle opendir(3) error.Pawel Jakub Dawidek2011-03-261-4/+7
| | | | Notes: svn path=/head/; revision=220023
* Implement fdopendir(3) by splitting __opendir2() into two parts, the upper partXin LI2008-04-161-1/+38
| | | | | | | | | deals with the usual __opendir2() calls, and the rest part with an interface translator to expose fdopendir(3) functionality. Manual page was obtained from kib@'s work for *at(2) system calls. Notes: svn path=/head/; revision=178256
* Per Regents of the University of Calfornia letter, remove advertisingWarner Losh2007-01-091-4/+0
| | | | | | | | | clause. # If I've done so improperly on a file, please let me know. Notes: svn path=/head/; revision=165903
* Eliminate double whitespace.Ruslan Ermilov2004-07-031-1/+1
| | | | Notes: svn path=/head/; revision=131539
* Mechanically kill hard sentence breaks.Ruslan Ermilov2004-07-021-4/+8
| | | | Notes: svn path=/head/; revision=131504
* mdoc(7) police: "The .Fn function".Ruslan Ermilov2002-12-181-0/+4
| | | | Notes: svn path=/head/; revision=108030
* mdoc(7) police: Use the new .In macro for #include statements.Ruslan Ermilov2001-10-011-2/+2
| | | | Notes: svn path=/head/; revision=84306
* mdoc(7) police: removed HISTORY info from the .Os call.Ruslan Ermilov2001-07-101-1/+1
| | | | Notes: svn path=/head/; revision=79531
* Cleanup XXXdir functions to eliminate global hash table ofDaniel Eischen2000-12-061-1/+1
| | | | | | | | | | | | | | | | | | | telldir positions. This will allow (future) locking on a per-DIR basis (for MT-safety). For now, this change does the following: o Remove the hash table from telldir.c. Recode to use queue macros. o Remove 'const' from 'telldir(const DIR *)'. o Remove 'register' variables as suggested in a recent thread. No response from: -current Notes: svn path=/head/; revision=69656
* Whitespace only change: trim trailing whitespace.Jeroen Ruigrok van der Werven2000-10-301-3/+3
| | | | Notes: svn path=/head/; revision=67967
* Introduce ".Lb" macro to libc manpages.Alexey Zelkin2000-04-211-0/+2
| | | | | | | More libraries manpages updates following. Notes: svn path=/head/; revision=59460
* Provide a man page for Alfreds lovely readdir_r function. AlsoWes Peters1999-11-291-0/+19
| | | | | | | | fixed a minor indentation nit and added a few {}s to make readdir_r easier on old eyes. Notes: svn path=/head/; revision=53872
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50476
* Add $Id$, to make it simpler for members of the translation teams toNik Clayton1999-07-121-0/+1
| | | | | | | | | | | | | | | | | | | | track. The $Id$ line is normally at the bottom of the main comment block in the man page, separated from the rest of the manpage by an empty comment, like so; .\" $Id$ .\" If the immediately preceding comment is a @(#) format ID marker than the the $Id$ will line up underneath it with no intervening blank lines. Otherwise, an additional blank line is inserted. Approved by: bde Notes: svn path=/head/; revision=48794
* Correct wrong claim about `telldir()' cookie lifetimes.Joseph Koshy1998-06-031-16/+11
| | | | | | | | PR: 4043 Submitted by: Joe Orthoefer <j_orthoefer@tia.net> Notes: svn path=/head/; revision=36603
* Sort cross references.Wolfram Schneider1997-01-201-2/+2
| | | | Notes: svn path=/head/; revision=21907
* Fix even more spelling errors in some more man pages.Mike Pritchard1996-01-301-1/+1
| | | | Notes: svn path=/head/; revision=13750
* BSD 4.4 Lite Lib SourcesRodney W. Grimes1994-05-271-0/+183
Notes: svn path=/cvs2svn/branches/unlabeled-1.1.1/; revision=1573