NetBSD Problem Report #52590

From www@NetBSD.org  Sun Oct  1 22:51:49 2017
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id A29A37A174
	for <gnats-bugs@gnats.NetBSD.org>; Sun,  1 Oct 2017 22:51:49 +0000 (UTC)
Message-Id: <20171001225148.741657A287@mollari.NetBSD.org>
Date: Sun,  1 Oct 2017 22:51:48 +0000 (UTC)
From: dhgutteridge@sympatico.ca
Reply-To: dhgutteridge@sympatico.ca
To: gnats-bugs@NetBSD.org
Subject: Minor documentation improvements for resize_ffs(8)
X-Send-Pr-Version: www-1.0

>Number:         52590
>Category:       bin
>Synopsis:       Minor documentation improvements for resize_ffs(8)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          closed
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Oct 01 22:55:00 +0000 2017
>Closed-Date:    Mon Oct 23 20:04:40 +0000 2017
>Last-Modified:  Tue Oct 24 09:10:00 +0000 2017
>Originator:     David H. Gutteridge
>Release:        HEAD
>Organization:
>Environment:
n/a
>Description:
I noticed a couple of minor issues with resize_ffs(8)'s documentation.
First, the usage message is missing the -p option:

--- resize_ffs.c.orig
+++ resize_ffs.c
@@ -2304,7 +2304,7 @@
 usage(void)
 {

-	(void)fprintf(stderr, "usage: %s [-cvy] [-s size] special\n",
+	(void)fprintf(stderr, "usage: %s [-cpvy] [-s size] special\n",
 	    getprogname());
 	exit(EXIT_FAILURE);
 }

Second, the man page makes reference to information in the WARNING
section that was removed years ago. (I stumbled over it since I read
the sentence in question and then went looking for what it could be
referring to.)

--- resize_ffs.8.orig
+++ resize_ffs.8
@@ -128,10 +128,8 @@
 .Aq riz@NetBSD.org
 (Byteswapped file system and UFS2 support)
 .Pp
-A big bug-finding kudos goes to John Kohl for finding the rotational
-layout bug referred to in the
-.Sx WARNING
-section above.
+A big bug-finding kudos goes to John Kohl for finding a significant
+rotational layout bug.
 .Sh BUGS
 Can fail to shrink a file system when there actually is enough space,
 because it does not distinguish between a block allocated as a block

Separately, unlike fsck(8), it seems resize_ffs(8) doesn't make any
mention of considerations about mounted vs. unmounted file systems. I
personally wouldn't be inclined to run it on a mounted file system,
but resize_lfs(8) states that tool only works on mounted file systems,
which may lead to users (like me) wondering.

>How-To-Repeat:
As above.
>Fix:
As above.

>Release-Note:

>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52590 CVS commit: src/sbin/resize_ffs
Date: Sun, 1 Oct 2017 18:59:19 -0400

 Module Name:	src
 Committed By:	christos
 Date:		Sun Oct  1 22:59:19 UTC 2017

 Modified Files:
 	src/sbin/resize_ffs: resize_ffs.8 resize_ffs.c

 Log Message:
 PR/52590: David H. Gutteridge: Minor documentation improvements


 To generate a diff of this commit:
 cvs rdiff -u -r1.17 -r1.18 src/sbin/resize_ffs/resize_ffs.8
 cvs rdiff -u -r1.51 -r1.52 src/sbin/resize_ffs/resize_ffs.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Soren Jacobsen" <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52590 CVS commit: [netbsd-7-0] src/sbin/resize_ffs
Date: Mon, 23 Oct 2017 19:24:33 +0000

 Module Name:	src
 Committed By:	snj
 Date:		Mon Oct 23 19:24:33 UTC 2017

 Modified Files:
 	src/sbin/resize_ffs [netbsd-7-0]: resize_ffs.8 resize_ffs.c

 Log Message:
 Pull up following revision(s) (requested by sborrill in ticket #1516):
 	sbin/resize_ffs/resize_ffs.8: revision 1.18
 	sbin/resize_ffs/resize_ffs.c: revision 1.48-1.53
 Fix the most obvious integer overflow errors which can lead to superblock
 corruption. Thanks to riastradh@
 --
 Use int64_t for loop index so we don't iterate forever/until trap.
 --
 Fix the syntax (pointed out by David H. Gutteridge on source-changes-d).
 Fix the build...
 --
 - More fixes to use 64bit offsets.
 - Compute left-over fragments also for FFS2.
 --
 PR/52590: David H. Gutteridge: Minor documentation improvements
 --
 Fix computation of left-over fragments also for ufs2.
 Fixes PR 52600.


 To generate a diff of this commit:
 cvs rdiff -u -r1.13.20.1 -r1.13.20.1.2.1 src/sbin/resize_ffs/resize_ffs.8
 cvs rdiff -u -r1.38.6.1 -r1.38.6.1.2.1 src/sbin/resize_ffs/resize_ffs.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Soren Jacobsen" <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52590 CVS commit: [netbsd-7-1] src/sbin/resize_ffs
Date: Mon, 23 Oct 2017 19:24:35 +0000

 Module Name:	src
 Committed By:	snj
 Date:		Mon Oct 23 19:24:35 UTC 2017

 Modified Files:
 	src/sbin/resize_ffs [netbsd-7-1]: resize_ffs.8 resize_ffs.c

 Log Message:
 Pull up following revision(s) (requested by sborrill in ticket #1516):
 	sbin/resize_ffs/resize_ffs.8: revision 1.18
 	sbin/resize_ffs/resize_ffs.c: revision 1.48-1.53
 Fix the most obvious integer overflow errors which can lead to superblock
 corruption. Thanks to riastradh@
 --
 Use int64_t for loop index so we don't iterate forever/until trap.
 --
 Fix the syntax (pointed out by David H. Gutteridge on source-changes-d).
 Fix the build...
 --
 - More fixes to use 64bit offsets.
 - Compute left-over fragments also for FFS2.
 --
 PR/52590: David H. Gutteridge: Minor documentation improvements
 --
 Fix computation of left-over fragments also for ufs2.
 Fixes PR 52600.


 To generate a diff of this commit:
 cvs rdiff -u -r1.13.20.1 -r1.13.20.1.6.1 src/sbin/resize_ffs/resize_ffs.8
 cvs rdiff -u -r1.38.6.2 -r1.38.6.2.2.1 src/sbin/resize_ffs/resize_ffs.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Soren Jacobsen" <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52590 CVS commit: [netbsd-7] src/sbin/resize_ffs
Date: Mon, 23 Oct 2017 19:24:37 +0000

 Module Name:	src
 Committed By:	snj
 Date:		Mon Oct 23 19:24:37 UTC 2017

 Modified Files:
 	src/sbin/resize_ffs [netbsd-7]: resize_ffs.8 resize_ffs.c

 Log Message:
 Pull up following revision(s) (requested by sborrill in ticket #1516):
 	sbin/resize_ffs/resize_ffs.8: revision 1.18
 	sbin/resize_ffs/resize_ffs.c: revision 1.48-1.53
 Fix the most obvious integer overflow errors which can lead to superblock
 corruption. Thanks to riastradh@
 --
 Use int64_t for loop index so we don't iterate forever/until trap.
 --
 Fix the syntax (pointed out by David H. Gutteridge on source-changes-d).
 Fix the build...
 --
 - More fixes to use 64bit offsets.
 - Compute left-over fragments also for FFS2.
 --
 PR/52590: David H. Gutteridge: Minor documentation improvements
 --
 Fix computation of left-over fragments also for ufs2.
 Fixes PR 52600.


 To generate a diff of this commit:
 cvs rdiff -u -r1.13.20.1 -r1.13.20.2 src/sbin/resize_ffs/resize_ffs.8
 cvs rdiff -u -r1.38.6.2 -r1.38.6.3 src/sbin/resize_ffs/resize_ffs.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: snj@NetBSD.org
State-Changed-When: Mon, 23 Oct 2017 20:04:40 +0000
State-Changed-Why:
patches applied by christos.  thanks!



From: "Soren Jacobsen" <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52590 CVS commit: [netbsd-8] src/sbin/resize_ffs
Date: Tue, 24 Oct 2017 09:08:40 +0000

 Module Name:	src
 Committed By:	snj
 Date:		Tue Oct 24 09:08:40 UTC 2017

 Modified Files:
 	src/sbin/resize_ffs [netbsd-8]: resize_ffs.8 resize_ffs.c

 Log Message:
 Pull up following revision(s) (requested by sborrill in ticket #308):
 	sbin/resize_ffs/resize_ffs.8: revision 1.18
 	sbin/resize_ffs/resize_ffs.c: revision 1.48-1.53
 Fix the most obvious integer overflow errors which can lead to superblock
 corruption. Thanks to riastradh@
 --
 Use int64_t for loop index so we don't iterate forever/until trap.
 --
 Fix the syntax (pointed out by David H. Gutteridge on source-changes-d).
 Fix the build...
 --
 - More fixes to use 64bit offsets.
 - Compute left-over fragments also for FFS2.
 --
 PR/52590: David H. Gutteridge: Minor documentation improvements
 --
 Fix computation of left-over fragments also for ufs2.
 Fixes PR 52600.


 To generate a diff of this commit:
 cvs rdiff -u -r1.17 -r1.17.6.1 src/sbin/resize_ffs/resize_ffs.8
 cvs rdiff -u -r1.47 -r1.47.6.1 src/sbin/resize_ffs/resize_ffs.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.