Bug 234954 - fsck -T flag suffers from ufs/ffs filesystem type ambiguity
Summary: fsck -T flag suffers from ufs/ffs filesystem type ambiguity
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
Depends on:
Reported: 2019-01-14 23:28 UTC by Ian Lepore
Modified: 2019-01-14 23:29 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Ian Lepore freebsd_committer 2019-01-14 23:28:50 UTC
The fsck(8) -T option is used to route options to the filesystem-specific programs it runs.  The fsck(8) wrapper program gleans the name of the filesystem type from a variety of sources... on the commandline, from fstab, from geom info, etc.  From some sources of info it decides a filesystem is ufs, from other sources it translates ufs to ffs.

This means that you can't reliably specify either -T ufs: or -T ffs: and be sure that the option will take effect.  fsck(8) should probably translate everything (-T names and filesystem type names) to either ufs or ffs, but after poking around a bit in the code, it appears that this translation has to happen in many scattered locations.

A workaround is available, by specifying the option(s) you want twice, using both of the filesystem type names.