Skip to content

Commit

Permalink
fsck_msdosfs(8): Introduce -B option as no-op
Browse files Browse the repository at this point in the history
When performing a background fsck on msdosfs devices, it ends
with the following error:

fsck_msdosfs: illegal option -- B
usage: fsck_msdosfs -p [-f] filesystem ...
       fsck_msdosfs [-ny] filesystem ...

Introduce -B option as a compatibility with fsck_ffs(8) and
also update the descriptions for -B and -C in fsck_msdosfs(8)
manual page.

Reviewed by:	imp
Approved by:	imp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D48132
  • Loading branch information
jurajlutter committed Dec 18, 2024
1 parent 6e423be commit d9ad257
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
14 changes: 9 additions & 5 deletions sbin/fsck_msdosfs/fsck_msdosfs.8
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd January 6, 2020
.Dd December 18, 2024
.Dt FSCK_MSDOSFS 8
.Os
.Sh NAME
Expand All @@ -32,10 +32,10 @@
.Sh SYNOPSIS
.Nm
.Fl p
.Op Fl Cf
.Op Fl BCf
.Ar filesystem ...
.Nm
.Op Fl CMny
.Op Fl BCMny
.Ar filesystem ...
.Sh DESCRIPTION
The
Expand Down Expand Up @@ -71,10 +71,14 @@ making any changes.
.Pp
The options are as follows:
.Bl -tag -width indent
.It Fl B
Ignored for
.Xr fsck 8
compatibility.
.It Fl C
Compatibility with the corresponding
Ignored for
.Xr fsck 8
option (skip check if clean), defined to no-op.
compatibility.
.It Fl F
Compatibility with the wrapper
.Xr fsck 8
Expand Down
5 changes: 3 additions & 2 deletions sbin/fsck_msdosfs/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,10 @@ main(int argc, char **argv)

skipclean = 1;
allow_mmap = 1;
while ((ch = getopt(argc, argv, "CfFnpyM")) != -1) {
while ((ch = getopt(argc, argv, "BCfFnpyM")) != -1) {
switch (ch) {
case 'C': /* for fsck_ffs compatibility */
case 'B': /* for fsck_ffs compatibility */
case 'C':
break;
case 'f':
skipclean = 0;
Expand Down

0 comments on commit d9ad257

Please sign in to comment.