Bug 234954

Summary: fsck -T flag suffers from ufs/ffs filesystem type ambiguity
Product: Base System Reporter: Ian Lepore <ian>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: New ---    
Severity: Affects Some People CC: imp
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   

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.