From owner-freebsd-doc@FreeBSD.ORG Tue Oct 7 01:40:01 2008 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7D431065690 for ; Tue, 7 Oct 2008 01:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 915BD8FC21 for ; Tue, 7 Oct 2008 01:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m971e1fi008032 for ; Tue, 7 Oct 2008 01:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m971e1Mv008031; Tue, 7 Oct 2008 01:40:01 GMT (envelope-from gnats) Resent-Date: Tue, 7 Oct 2008 01:40:01 GMT Resent-Message-Id: <200810070140.m971e1Mv008031@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-doc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Matthew D. Fuller" Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB1FE1065690 for ; Tue, 7 Oct 2008 01:31:56 +0000 (UTC) (envelope-from fullermd@over-yonder.net) Received: from thyme.infocus-llc.com (server.infocus-llc.com [206.156.254.44]) by mx1.freebsd.org (Postfix) with ESMTP id 84A798FC22 for ; Tue, 7 Oct 2008 01:31:56 +0000 (UTC) (envelope-from fullermd@over-yonder.net) Received: from draco.over-yonder.net (c-75-64-197-185.hsd1.ms.comcast.net [75.64.197.185]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by thyme.infocus-llc.com (Postfix) with ESMTPSA id 2102937B4F7 for ; Mon, 6 Oct 2008 20:31:55 -0500 (CDT) Received: by draco.over-yonder.net (Postfix, from userid 100) id DBEEF61C41; Mon, 6 Oct 2008 20:31:53 -0500 (CDT) Message-Id: <20081007013153.DBEEF61C41@draco.over-yonder.net> Date: Mon, 6 Oct 2008 20:31:53 -0500 (CDT) From: "Matthew D. Fuller" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: docs/127908: [PATCH] readdir(3) error documentation X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "Matthew D. Fuller" List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Oct 2008 01:40:01 -0000 >Number: 127908 >Category: docs >Synopsis: [PATCH] readdir(3) error documentation >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Tue Oct 07 01:40:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Matthew D. Fuller >Release: FreeBSD 7.0-BETA4 i386 >Organization: >Environment: System: FreeBSD draco.over-yonder.net 7.0-BETA4 FreeBSD 7.0-BETA4 #0: Sun Dec 9 18:37:58 CST 2007 root@draco.over-yonder.net:/bsd/obj/bsd/src/sys/DRACO i386 >Description: 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. >How-To-Repeat: >Fix: Index: directory.3 =================================================================== RCS file: /usr/cvs/src/lib/libc/gen/directory.3,v retrieving revision 1.17 diff -u -r1.17 directory.3 --- directory.3 16 Apr 2008 18:59:36 -0000 1.17 +++ directory.3 7 Oct 2008 01:26:30 -0000 @@ -122,9 +122,12 @@ 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 >Release-Note: >Audit-Trail: >Unformatted: