Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/dumpfs dumpfs: remove confusing output for UFS2



details:   https://anonhg.NetBSD.org/src/rev/445a08c5ccc9
branches:  trunk
changeset: 372676:445a08c5ccc9
user:      chs <chs%NetBSD.org@localhost>
date:      Mon Dec 19 18:51:42 2022 +0000

description:
dumpfs: remove confusing output for UFS2

remove the mention of "fslevel 5" because no such thing exists.
the whole "fs level" concept really only applies to UFS1, so don't print
the line with the level number and details for UFS2 file systems at all.
try to clarify this in the manpage as well.
prompted by PR 57082.

diffstat:

 usr.sbin/dumpfs/dumpfs.8 |   4 ++--
 usr.sbin/dumpfs/dumpfs.c |  15 ++++++++-------
 2 files changed, 10 insertions(+), 9 deletions(-)

diffs (61 lines):

diff -r cc536f6981a1 -r 445a08c5ccc9 usr.sbin/dumpfs/dumpfs.8
--- a/usr.sbin/dumpfs/dumpfs.8  Mon Dec 19 01:51:29 2022 +0000
+++ b/usr.sbin/dumpfs/dumpfs.8  Mon Dec 19 18:51:42 2022 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: dumpfs.8,v 1.20 2010/02/27 10:49:42 wiz Exp $
+.\"    $NetBSD: dumpfs.8,v 1.21 2022/12/19 18:51:42 chs Exp $
 .\"
 .\" Copyright (c) 1983, 1991, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -80,7 +80,7 @@
 .Nm
 is useful mostly for finding out certain file system
 information such as the file system block size, minimum
-free space percentage, and the file system level that
+free space percentage, and (for FFSv1) the file system level that
 can be upgraded with the
 .Fl c
 option of
diff -r cc536f6981a1 -r 445a08c5ccc9 usr.sbin/dumpfs/dumpfs.c
--- a/usr.sbin/dumpfs/dumpfs.c  Mon Dec 19 01:51:29 2022 +0000
+++ b/usr.sbin/dumpfs/dumpfs.c  Mon Dec 19 18:51:42 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dumpfs.c,v 1.66 2022/11/17 06:40:40 chs Exp $  */
+/*     $NetBSD: dumpfs.c,v 1.67 2022/12/19 18:51:42 chs Exp $  */
 
 /*
  * Copyright (c) 1983, 1992, 1993
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)dumpfs.c   8.5 (Berkeley) 4/29/95";
 #else
-__RCSID("$NetBSD: dumpfs.c,v 1.66 2022/11/17 06:40:40 chs Exp $");
+__RCSID("$NetBSD: dumpfs.c,v 1.67 2022/12/19 18:51:42 chs Exp $");
 #endif
 #endif /* not lint */
 
@@ -314,7 +314,7 @@
            fs->fs_magic, ctime(&t));
 
        if (is_ufs2)
-               i = 5;
+               i = -1;
        else {
                i = 0;
                if (fs->fs_old_postblformat != FS_42POSTBLFMT) {
@@ -338,10 +338,11 @@
            fs->fs_id[0] || fs->fs_id[1])
                printf("superblock location\t%jd\tid\t[ %x %x ]\n",
                    (intmax_t)fs->fs_sblockloc, fs->fs_id[0], fs->fs_id[1]);
-       printf("cylgrp\t%s\tinodes\t%s\tsblock\t%s\tfslevel %d\n",
-           i < 1 ? "static" : "dynamic",
-           i < 2 ? "4.2/4.3BSD" : i < 5 ? "4.4BSD" : "FFSv2",
-           i < 4 ? "FFSv1" : "FFSv2", i);
+       if (!is_ufs2)
+               printf("cylgrp\t%s\tinodes\t%s\tsblock\t%s\tfslevel %d\n",
+                   i < 1 ? "static" : "dynamic",
+                   i < 2 ? "4.2/4.3BSD" : i < 5 ? "4.4BSD" : "FFSv2",
+                   i < 4 ? "FFSv1" : "FFSv2", i);
        printf("nbfree\t%lld\tndir\t%lld\tnifree\t%lld\tnffree\t%lld\n",
            (long long)fs->fs_cstotal.cs_nbfree,
            (long long)fs->fs_cstotal.cs_ndir,



Home | Main Index | Thread Index | Old Index