NetBSD Problem Report #60285

From www@netbsd.org  Thu May 21 16:16:58 2026
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits)
	 client-signature RSA-PSS (2048 bits))
	(Client CN "mail.netbsd.org", Issuer "R13" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 7244A1A9239
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 21 May 2026 16:16:58 +0000 (UTC)
Message-Id: <20260521161657.8D1CD1A923C@mollari.NetBSD.org>
Date: Thu, 21 May 2026 16:16:57 +0000 (UTC)
From: jlduran@FreeBSD.org
Reply-To: jlduran@FreeBSD.org
To: gnats-bugs@NetBSD.org
Subject: makefs: ffs: Print missing options when debugging
X-Send-Pr-Version: www-1.0
X-From4GNATS: "jlduran@FreeBSD.org via gnats" <gnats-admin@NetBSD.org>

>Number:         60285
>Category:       bin
>Synopsis:       makefs: ffs: Print missing options when debugging
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu May 21 16:20:00 +0000 2026
>Originator:     Jose Luis Duran
>Release:        trunk
>Organization:
FreeBSD
>Environment:
>Description:
Update ffs_dump_fsinfo() to include options that were omitted from the debug output (when -t ffs):

- avgfilesize
- avgfpdir
- label
- maxbpcg
- version

>How-To-Repeat:
makefs -d 0xa00 -t ffs -o version=2,label="hello world" foo.img /tmp

* Make sure that "-t ffs" appears before "-o ...", don't ask me how I know.

>Fix:
--- a/usr.sbin/makefs/ffs.c
+++ b/usr.sbin/makefs/ffs.c
@@ -457,14 +457,18 @@ ffs_dump_fsinfo(fsinfo_t *f)
            (long long)f->freeblocks, f->freeblockpc);
        printf("\tneedswap %d, sectorsize %d\n", f->needswap, f->sectorsize);

+       printf("\tavgfilesize %d, avgfpdir %d\n",
+           fs->avgfilesize, fs->avgfpdir);
        printf("\tbsize %d, fsize %d, cpg %d, density %d\n",
            fs->bsize, fs->fsize, fs->cpg, fs->density);
        printf("\tnsectors %d, rpm %d, minfree %d\n",
            fs->nsectors, fs->rpm, fs->minfree);
-       printf("\tmaxcontig %d, maxbpg %d\n",
-           fs->maxcontig, fs->maxbpg);
+       printf("\tlabel %s\n", fs->label);
+       printf("\tmaxcontig %d, maxbpg %d, maxbpcg %d\n",
+           fs->maxcontig, fs->maxbpg, fs->maxblkspercg);
        printf("\toptimization %s\n",
            fs->optimization == FS_OPTSPACE ? "space" : "time");
+       printf("\tversion %d\n", fs->version);
 }

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.