From nobody@FreeBSD.org  Mon Mar 28 19:51:42 2005
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 3301D16A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 28 Mar 2005 19:51:42 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 1778843D54
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 28 Mar 2005 19:51:42 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j2SJpdbY046514
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 28 Mar 2005 19:51:39 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id j2SJpdb2046513;
	Mon, 28 Mar 2005 19:51:39 GMT
	(envelope-from nobody)
Message-Id: <200503281951.j2SJpdb2046513@www.freebsd.org>
Date: Mon, 28 Mar 2005 19:51:39 GMT
From: Derek Tattersall <dtatters@gmail.conm>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Example in archive_read man page is incorrect
X-Send-Pr-Version: www-2.3

>Number:         79318
>Category:       docs
>Synopsis:       Example in archive_read man page is incorrect
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kientzle
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 28 20:00:06 GMT 2005
>Closed-Date:    Sat May 21 19:47:08 GMT 2005
>Last-Modified:  Sat May 21 19:47:08 GMT 2005
>Originator:     Derek Tattersall
>Release:        Current
>Organization:
>Environment:
($?=1)dlt@lorne 1076 dlt% uname -a
FreeBSD lorne.arm.org 6.0-CURRENT FreeBSD 6.0-CURRENT #24: Sun Mar 20 12:26:22 EST 2005     root@lorne.arm.org:/usr/obj/usr/src/sys/LORNE  i386
     
>Description:
      Man page, archive_read.3, has a mistake in the example code, myopen() function.  The return value does not agree with the description of the routine, nor with the libarchive code.
>How-To-Repeat:
Construct an example using the code from the man page.
>Fix:
    --- /usr/src/lib/libarchive/archive_read.3      Sun Feb 20 10:54:50 2005
+++ ./archive_read.3    Mon Mar 28 14:44:07 2005
@@ -389,7 +389,7 @@
   struct mydata *mydata = client_data;
 
   mydata->fd = open(mydata->name, O_RDONLY);
-  return (mydata->fd >= 0);
+  return (mydata->fd >= 0 ? ARCHIVE_OK : ARCHIVE_FATAL);
 }
 
 int

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-doc 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Mar 28 22:32:05 GMT 2005 
Responsible-Changed-Why:  
docs bug. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=79318 
Responsible-Changed-From-To: freebsd-doc->kientzle 
Responsible-Changed-By: brueffer 
Responsible-Changed-When: Sat May 21 16:16:52 CEST 2005 
Responsible-Changed-Why:  
Over to the libarchive author and maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=79318 
State-Changed-From-To: open->closed 
State-Changed-By: kientzle 
State-Changed-When: Sat May 21 19:46:16 GMT 2005 
State-Changed-Why:  
Committed change in archive_read.3 1.20 

http://www.freebsd.org/cgi/query-pr.cgi?pr=79318 
>Unformatted:
