Bug 127908

Summary: [patch] readdir(3) error documentation
Product: Documentation Reporter: fullermd
Component: Books & ArticlesAssignee: Eitan Adler <eadler>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description fullermd 2008-10-07 02:40:01 UTC
	The manpage for readdir(3) doesn't document the possible error
	returns.  The only mention it makes in fact is misleading, since it
	doesn't describe something that can happen.

	The rest of the functions really should have their errno values
	documented as well, probably with the addition of a ERRORS section to
	the manpage.  But this patch gets one step closer, anyway.
Comment 1 fullermd 2010-10-09 11:09:18 UTC
> >Arrival-Date:   Tue Oct 07 01:40:01 UTC 2008

In celebration of the 2 year anniversary of this 6-line manpage patch
a couple days ago, can somebody take a quick look at it?  The code
still seems to support the change...


-- 
Matthew Fuller     (MF4839)   |  fullermd@over-yonder.net
Systems/Network Administrator |  http://www.over-yonder.net/~fullermd/
           On the Internet, nobody can hear you scream.
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2012-01-18 13:12:37 UTC
Responsible Changed
From-To: freebsd-doc->eadler

I'll take it.
Comment 3 dfilter service freebsd_committer freebsd_triage 2012-02-09 20:49:15 UTC
Author: eadler
Date: Thu Feb  9 20:49:03 2012
New Revision: 231299
URL: http://svn.freebsd.org/changeset/base/231299

Log:
  More accurately document what happens on error.
  
  PR:		docs/127908
  Submitted by:	Matthew D. Fuller <fullermd@over-yonder.net>
  Approved by:	cperciva
  MFC after:	1 week

Modified:
  head/lib/libc/gen/directory.3

Modified: head/lib/libc/gen/directory.3
==============================================================================
--- head/lib/libc/gen/directory.3	Thu Feb  9 20:44:20 2012	(r231298)
+++ head/lib/libc/gen/directory.3	Thu Feb  9 20:49:03 2012	(r231299)
@@ -122,9 +122,12 @@ function
 returns a pointer to the next directory entry.
 It returns
 .Dv NULL
-upon reaching the end of the directory or detecting an invalid
-.Fn seekdir
-operation.
+upon reaching the end of the directory or on error.
+In the event of an error,
+.Va errno
+may be set to any of the values documented for the
+.Xr getdirentries 2
+system call.
 .Pp
 The
 .Fn readdir_r
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 4 Eitan Adler freebsd_committer freebsd_triage 2012-02-09 20:54:15 UTC
State Changed
From-To: open->patched

committed in r231299
Comment 5 dfilter service freebsd_committer freebsd_triage 2012-02-17 00:55:36 UTC
Author: eadler
Date: Fri Feb 17 00:55:26 2012
New Revision: 231847
URL: http://svn.freebsd.org/changeset/base/231847

Log:
  MFC r231299:
  	 - More accurately document what happens on error.
  
  PR:		docs/127908
  Approved by:	cperciva

Modified:
  stable/9/lib/libc/gen/directory.3
Directory Properties:
  stable/9/lib/libc/   (props changed)

Modified: stable/9/lib/libc/gen/directory.3
==============================================================================
--- stable/9/lib/libc/gen/directory.3	Fri Feb 17 00:27:48 2012	(r231846)
+++ stable/9/lib/libc/gen/directory.3	Fri Feb 17 00:55:26 2012	(r231847)
@@ -122,9 +122,12 @@ function
 returns a pointer to the next directory entry.
 It returns
 .Dv NULL
-upon reaching the end of the directory or detecting an invalid
-.Fn seekdir
-operation.
+upon reaching the end of the directory or on error.
+In the event of an error,
+.Va errno
+may be set to any of the values documented for the
+.Xr getdirentries 2
+system call.
 .Pp
 The
 .Fn readdir_r
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 6 dfilter service freebsd_committer freebsd_triage 2012-02-17 00:56:27 UTC
Author: eadler
Date: Fri Feb 17 00:56:17 2012
New Revision: 231848
URL: http://svn.freebsd.org/changeset/base/231848

Log:
  MFC r231299:
  	 - More accurately document what happens on error.
  
  PR:		docs/127908
  Approved by:	cperciva

Modified:
  stable/7/lib/libc/gen/directory.3
Directory Properties:
  stable/7/lib/libc/   (props changed)

Modified: stable/7/lib/libc/gen/directory.3
==============================================================================
--- stable/7/lib/libc/gen/directory.3	Fri Feb 17 00:55:26 2012	(r231847)
+++ stable/7/lib/libc/gen/directory.3	Fri Feb 17 00:56:17 2012	(r231848)
@@ -122,9 +122,12 @@ function
 returns a pointer to the next directory entry.
 It returns
 .Dv NULL
-upon reaching the end of the directory or detecting an invalid
-.Fn seekdir
-operation.
+upon reaching the end of the directory or on error.
+In the event of an error,
+.Va errno
+may be set to any of the values documented for the
+.Xr getdirentries 2
+system call.
 .Pp
 The
 .Fn readdir_r
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 7 Eitan Adler freebsd_committer freebsd_triage 2012-02-17 01:21:38 UTC
State Changed
From-To: patched->closed

Committed. Thanks!