Skip site navigation (1)Skip section navigation (2)
Date:      17 Jan 2004 13:36:29 -0000
From:      Alex Popa <razor@ldc.ro>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   bin/61473: ffsinfo *appends* its output to an existing outfile
Message-ID:  <20040117133629.22552.qmail@ldc.ro>
Resent-Message-ID: <200401171340.i0HDeJKm059921@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         61473
>Category:       bin
>Synopsis:       ffsinfo *appends* its output to an existing outfile
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jan 17 05:40:19 PST 2004
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040117133629.22552.qmail>