Module Name: src Committed By: martin Date: Tue Dec 20 09:49:21 UTC 2022
Modified Files: src/usr.sbin/dumpfs [netbsd-10]: dumpfs.8 dumpfs.c Log Message: Pull up following revision(s) (requested by chs in ticket #9): usr.sbin/dumpfs/dumpfs.c: revision 1.67 usr.sbin/dumpfs/dumpfs.8: revision 1.21 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. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.20.56.1 src/usr.sbin/dumpfs/dumpfs.8 cvs rdiff -u -r1.66 -r1.66.2.1 src/usr.sbin/dumpfs/dumpfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.sbin/dumpfs/dumpfs.8 diff -u src/usr.sbin/dumpfs/dumpfs.8:1.20 src/usr.sbin/dumpfs/dumpfs.8:1.20.56.1 --- src/usr.sbin/dumpfs/dumpfs.8:1.20 Sat Feb 27 10:49:42 2010 +++ src/usr.sbin/dumpfs/dumpfs.8 Tue Dec 20 09:49:21 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: dumpfs.8,v 1.20 2010/02/27 10:49:42 wiz Exp $ +.\" $NetBSD: dumpfs.8,v 1.20.56.1 2022/12/20 09:49:21 martin Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -80,7 +80,7 @@ defaults to .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 Index: src/usr.sbin/dumpfs/dumpfs.c diff -u src/usr.sbin/dumpfs/dumpfs.c:1.66 src/usr.sbin/dumpfs/dumpfs.c:1.66.2.1 --- src/usr.sbin/dumpfs/dumpfs.c:1.66 Thu Nov 17 06:40:40 2022 +++ src/usr.sbin/dumpfs/dumpfs.c Tue Dec 20 09:49:21 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: dumpfs.c,v 1.66 2022/11/17 06:40:40 chs Exp $ */ +/* $NetBSD: dumpfs.c,v 1.66.2.1 2022/12/20 09:49:21 martin Exp $ */ /* * Copyright (c) 1983, 1992, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19 #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.66.2.1 2022/12/20 09:49:21 martin Exp $"); #endif #endif /* not lint */ @@ -314,7 +314,7 @@ print_superblock(struct fs *fs, uint16_t 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 @@ print_superblock(struct fs *fs, uint16_t 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,