From dan+master7.ms.mff.cuni.cz@ms.mff.cuni.cz  Tue Jul 27 08:30:03 2010
Return-Path: <dan+master7.ms.mff.cuni.cz@ms.mff.cuni.cz>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 802B61065674
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 27 Jul 2010 08:30:03 +0000 (UTC)
	(envelope-from dan+master7.ms.mff.cuni.cz@ms.mff.cuni.cz)
Received: from master7.ms.mff.cuni.cz (master7.ms.mff.cuni.cz [195.113.20.22])
	by mx1.freebsd.org (Postfix) with ESMTP id 142A18FC16
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 27 Jul 2010 08:30:02 +0000 (UTC)
Received: from master7.ms.mff.cuni.cz (localhost [127.0.0.1])
	by master7.ms.mff.cuni.cz (8.14.4/8.14.3) with ESMTP id o6R8BPm1012875
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 27 Jul 2010 10:11:25 +0200 (CEST)
	(envelope-from dan@master7.ms.mff.cuni.cz)
Received: (from root@localhost)
	by master7.ms.mff.cuni.cz (8.14.4/8.14.4/Submit) id o6R8BPaq012874;
	Tue, 27 Jul 2010 10:11:25 +0200 (CEST)
	(envelope-from dan)
Message-Id: <201007270811.o6R8BPaq012874@master7.ms.mff.cuni.cz>
Date: Tue, 27 Jul 2010 10:11:25 +0200 (CEST)
From: Dan Lukes <dan@obluda.cz>
Reply-To: Dan Lukes <dan@obluda.cz>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [ PATCH ] {MD[245],SHA_,SHA1_,SHA256_}{End,File,FileChunk} errno's are not documented
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         148987
>Category:       docs
>Synopsis:       [patch] {MD[245]|SHA_|SHA1_|SHA256_}{End|File|FileChunk} errno's are not documented
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jul 27 08:40:01 UTC 2010
>Closed-Date:    
>Last-Modified:  Fri Aug 27 14:28:07 UTC 2010
>Originator:     Dan Lukes
>Release:        FreeBSD 7.3-RELEASE-p2 i386
>Organization:
Obludarium
>Environment:
System: FreeBSD 7.3-RELEASE-p2 i386
lib/libmd/mdX.3,v 1.30.10.1 2010/02/10 00:26:20 kensmith

>Description:
ERRORS section is not present within manual page for MD[245]End/SHA1_End/SHA256_End function and related *_File/*_FileChunk functions. 
>How-To-Repeat:
>Fix:

ERRORS section should be added.

Attached patch is for MDx suite, but the same section should be added to sha.3/sha256.3 as well

Please rephrase my texts if necesarry.

--- lib/libmd/mdX.3.orig	2010-07-27 09:37:42.000000000 +0200
+++ lib/libmd/mdX.3	2010-07-27 09:57:06.000000000 +0200
@@ -143,6 +143,26 @@
 If the
 .Fa buf
 argument is non-null it must point to at least 33 characters of buffer space.
+.Sh ERRORS
+The
+.Fn MDXEnd
+function caled with null buf argument may fail and return NULL if:
+.Bl -tag -width Er
+.It Bq Er ENOMEM
+Insufficient storage space is available.
+.El
+.Pp
+The
+.Fn MDXFile
+and
+.Fn MDXFileChunk
+may return NULL when underlying 
+.Xr open 2 ,
+.Xr fstat 2 ,
+.Xr lseek 2
+or
+.Xr MDXEnd 2
+failed. For the list of possible errno's see documentation of such functions.
 .Sh SEE ALSO
 .Xr md2 3 ,
 .Xr md4 3 ,

>Release-Note:
>Audit-Trail:
>Unformatted:
