From razor@ldc.ro  Sat Jan 17 05:36:32 2004
Return-Path: <razor@ldc.ro>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 85CFD16A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 17 Jan 2004 05:36:32 -0800 (PST)
Received: from ldc.ro (ldc-gw.rdsnet.ro [213.157.163.8])
	by mx1.FreeBSD.org (Postfix) with SMTP id DC3FA43D53
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 17 Jan 2004 05:36:30 -0800 (PST)
	(envelope-from razor@ldc.ro)
Received: (qmail 22594 invoked by uid 666); 17 Jan 2004 13:36:29 -0000
Message-Id: <20040117133629.22552.qmail@ldc.ro>
Date: 17 Jan 2004 13:36:29 -0000
From: Alex Popa <razor@ldc.ro>
Reply-To: Alex Popa <razor@ldc.ro>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: ffsinfo *appends* its output to an existing outfile
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         61473
>Category:       bin
>Synopsis:       ffsinfo *appends* its output to an existing outfile
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jan 17 05:40:19 PST 2004
>Closed-Date:    Thu Jan 22 21:15:02 PST 2004
>Last-Modified:  Thu Jan 22 21:15:02 PST 2004
>Originator:     Alex Popa
>Release:        FreeBSD 4.9-STABLE i386
>Organization:
>Environment:
System: FreeBSD ns.ldc.ro 4.9-STABLE FreeBSD 4.9-STABLE #0: Fri Jan 2 21:44:54 EET 2004 root@ns.ldc.ro:/usr/obj/usr/src/sys/NS i386

>Description:
The ffsinfo manpage mentions the output is "generated into" the file
outfile , but the code (namely dbg_open in /usr/src/sbin/growfs/debug.c)
actually APPENDS the output to said file.  The manpage should match the
code, and possibly warn people to delete the outfile before running
ffsinfo again.

>How-To-Repeat:
Run ffsinfo on two different filesystems without deleting the outfile.
At first look, it seems the outfile has not changed (actually the info
on the second filesystem is there, but after the info about the first
one ends.

OR run ffsinfo twice, and notice the increasing output size:

ns# rm /var/tmp/ffsinfo; \
    ffsinfo /dev/ad0s1a; du /var/tmp/ffsinfo; \
    ffsinfo /dev/ad0s1a; du /var/tmp/ffsinfo
92      /var/tmp/ffsinfo
182     /var/tmp/ffsinfo

>Fix:

Apply the following patch to /usr/src/sbin/ffsinfo/ffsinfo.8:

--- ffsinfo.8.orig	Sat Jan 17 15:34:21 2004
+++ ffsinfo.8	Sat Jan 17 15:34:36 2004
@@ -58,7 +58,7 @@
 .Xr dumpfs 8
 utility.
 .Pp
-The output is generated into the file
+The output is appended to the file
 .Pa outfile .
 Also expect the output file to be rather large.
 Up to 2 percent of the size of the specified file system is not uncommon.

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: cperciva 
State-Changed-When: Thu Jan 22 21:14:31 PST 2004 
State-Changed-Why:  
Committed, thanks! 


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