Display the superblock format as the second line ("FFSv1" or "FFSv2").
No need to display the magic format further down.
This commit is contained in:
parent
f76e5aa298
commit
18f0896759
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: dumpfs.c,v 1.52 2009/04/15 05:43:22 lukem Exp $ */
|
/* $NetBSD: dumpfs.c,v 1.53 2009/05/07 06:40:38 lukem Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1983, 1992, 1993
|
* Copyright (c) 1983, 1992, 1993
|
||||||
|
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1992, 1993\
|
||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)dumpfs.c 8.5 (Berkeley) 4/29/95";
|
static char sccsid[] = "@(#)dumpfs.c 8.5 (Berkeley) 4/29/95";
|
||||||
#else
|
#else
|
||||||
__RCSID("$NetBSD: dumpfs.c,v 1.52 2009/04/15 05:43:22 lukem Exp $");
|
__RCSID("$NetBSD: dumpfs.c,v 1.53 2009/05/07 06:40:38 lukem Exp $");
|
||||||
#endif
|
#endif
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
|
@ -275,6 +275,7 @@ print_superblock(struct fs *fs, uint16_t *opostbl,
|
||||||
time_t t;
|
time_t t;
|
||||||
int32_t fsflags;
|
int32_t fsflags;
|
||||||
|
|
||||||
|
printf("format\tFFSv%d\n", is_ufs2+1);
|
||||||
#if BYTE_ORDER == LITTLE_ENDIAN
|
#if BYTE_ORDER == LITTLE_ENDIAN
|
||||||
if (needswap)
|
if (needswap)
|
||||||
#else
|
#else
|
||||||
|
@ -287,8 +288,8 @@ print_superblock(struct fs *fs, uint16_t *opostbl,
|
||||||
if ((sblock != SBLOCK_UFS1) || ISOPT(opt_alt_super))
|
if ((sblock != SBLOCK_UFS1) || ISOPT(opt_alt_super))
|
||||||
printf("location %lld\t(-b %lld)\n",
|
printf("location %lld\t(-b %lld)\n",
|
||||||
(long long)sblock, (long long)(sblock/dev_bsize));
|
(long long)sblock, (long long)(sblock/dev_bsize));
|
||||||
printf("magic\t%x (UFS%d)\ttime\t%s",
|
printf("magic\t%-8x\ttime\t%s",
|
||||||
fs->fs_magic, is_ufs2+1, ctime(&t));
|
fs->fs_magic, ctime(&t));
|
||||||
|
|
||||||
if (is_ufs2)
|
if (is_ufs2)
|
||||||
i = 5;
|
i = 5;
|
||||||
|
@ -318,7 +319,7 @@ print_superblock(struct fs *fs, uint16_t *opostbl,
|
||||||
printf("cylgrp\t%s\tinodes\t%s\tsblock\t%s\tfslevel %d\n",
|
printf("cylgrp\t%s\tinodes\t%s\tsblock\t%s\tfslevel %d\n",
|
||||||
i < 1 ? "static" : "dynamic",
|
i < 1 ? "static" : "dynamic",
|
||||||
i < 2 ? "4.2/4.3BSD" : i < 5 ? "4.4BSD" : "FFSv2",
|
i < 2 ? "4.2/4.3BSD" : i < 5 ? "4.4BSD" : "FFSv2",
|
||||||
i < 4 ? "FFSv1" : "FFSv2", i);
|
i < 4 ? "FFSv1" : "FFSv2", i);
|
||||||
printf("nbfree\t%lld\tndir\t%lld\tnifree\t%lld\tnffree\t%lld\n",
|
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_nbfree,
|
||||||
(long long)fs->fs_cstotal.cs_ndir,
|
(long long)fs->fs_cstotal.cs_ndir,
|
||||||
|
|
Loading…
Reference in New Issue