Page MenuHomeFreeBSD

D61452.1794698194.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D61452.1794698194.diff

diff --git a/sbin/fsck/fsck.8 b/sbin/fsck/fsck.8
--- a/sbin/fsck/fsck.8
+++ b/sbin/fsck/fsck.8
@@ -36,6 +36,7 @@
.Sh SYNOPSIS
.Nm
.Op Fl Cdfnpvy
+.Op Fl b Ar block
.Op Fl B | F
.Op Fl T Ar fstype : Ns Ar fsoptions
.Op Fl t Ar fstype
@@ -123,6 +124,10 @@
.Pp
The options are as follows:
.Bl -tag -width indent
+.It Fl b Ar block
+Use the block number
+.Ar block
+as the super block for the file system.
.It Fl C
Check if the
.Dq clean
diff --git a/sbin/fsck/fsck.c b/sbin/fsck/fsck.c
--- a/sbin/fsck/fsck.c
+++ b/sbin/fsck/fsck.c
@@ -98,7 +98,7 @@
struct fstab *fs;
int i, rval = 0;
const char *vfstype = NULL;
- char globopt[3];
+ char globopt[3], bopt[80];
const char *etc_fstab;
globopt[0] = '-';
@@ -108,7 +108,7 @@
TAILQ_INIT(&opthead);
etc_fstab = NULL;
- while ((i = getopt(argc, argv, "BCdvpfFnyl:t:T:c:")) != -1)
+ while ((i = getopt(argc, argv, "BCdvpfFnyl:t:T:c:b:")) != -1)
switch (i) {
case 'B':
if (flags & CHECK_BACKGRD)
@@ -169,6 +169,11 @@
etc_fstab = optarg;
break;
+ case 'b':
+ snprintf(bopt, sizeof(bopt), "-b %s", optarg);
+ catopt(&options, bopt);
+ break;
+
case '?':
default:
usage();

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 14, 11:16 PM (19 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41709810
Default Alt Text
D61452.1794698194.diff (1 KB)

Event Timeline