Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157928388
D30881.id91682.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D30881.id91682.diff
View Options
diff --git a/sbin/dumpfs/dumpfs.8 b/sbin/dumpfs/dumpfs.8
--- a/sbin/dumpfs/dumpfs.8
+++ b/sbin/dumpfs/dumpfs.8
@@ -28,7 +28,7 @@
.\" @(#)dumpfs.8 8.1 (Berkeley) 6/5/93
.\" $FreeBSD$
.\"
-.Dd May 16, 2013
+.Dd July 2, 2021
.Dt DUMPFS 8
.Os
.Sh NAME
@@ -39,6 +39,7 @@
.Op Fl f
.Op Fl l
.Op Fl m
+.Op Fl s
.Ar filesys | device
.Sh DESCRIPTION
The
@@ -46,9 +47,10 @@
utility prints out the UFS super block and cylinder group information
for the file system or special device specified, unless the
.Fl f ,
-.Fl l
+.Fl l ,
+.Fl m ,
or
-.Fl m
+.Fl s
flag is specified.
The listing is very long and detailed.
This
@@ -97,6 +99,10 @@
.Fl r
flag is needed if the filesystem uses
.Xr gjournal 8 .
+.Pp
+If
+.Fl s
+is specified, only the super block information is printed.
.Sh SEE ALSO
.Xr fs 5 ,
.Xr fsck 8 ,
diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c
--- a/sbin/dumpfs/dumpfs.c
+++ b/sbin/dumpfs/dumpfs.c
@@ -81,7 +81,7 @@
static struct uufsd disk;
-static int dumpfs(const char *);
+static int dumpfs(const char *, int);
static int dumpfsid(void);
static int dumpcg(void);
static int dumpfreespace(const char *, int);
@@ -96,11 +96,11 @@
main(int argc, char *argv[])
{
const char *name;
- int ch, dofreespace, domarshal, dolabel, eval;
+ int ch, dofreespace, domarshal, dolabel, dosb, eval;
- dofreespace = domarshal = dolabel = eval = 0;
+ dofreespace = domarshal = dolabel = dosb = eval = 0;
- while ((ch = getopt(argc, argv, "lfm")) != -1) {
+ while ((ch = getopt(argc, argv, "lfms")) != -1) {
switch (ch) {
case 'f':
dofreespace++;
@@ -111,6 +111,9 @@
case 'l':
dolabel = 1;
break;
+ case 's':
+ dosb = 1;
+ break;
case '?':
default:
usage();
@@ -139,7 +142,7 @@
else if (dolabel)
eval |= dumpfsid();
else
- eval |= dumpfs(name);
+ eval |= dumpfs(name, dosb);
ufs_disk_close(&disk);
}
exit(eval);
@@ -154,7 +157,7 @@
}
static int
-dumpfs(const char *name)
+dumpfs(const char *name, int dosb)
{
time_t fstime, fsmtime;
int64_t fssize;
@@ -324,6 +327,8 @@
printf("blocks in last group %ld\n\n",
(long)((fssize % afs.fs_fpg) / afs.fs_frag));
}
+ if (dosb)
+ return (0);
while ((i = cgread(&disk)) != 0) {
if (i == -1 || dumpcg())
goto err;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, May 27, 2:00 PM (9 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33559187
Default Alt Text
D30881.id91682.diff (2 KB)
Attached To
Mode
D30881: dumpfs(8): add option to only print superblock information
Attached
Detach File
Event Timeline
Log In to Comment