newfs_msdos prevents using -A with -o but complains on -A and -r Doesn't allow -o but complains on -r # newfs_msdos -F 16 -c 8 -o 8192 -m 0xF8 -A /dev/ada5s1 newfs_msdos: align (-A) is incompatible with -r Allows -r # newfs_msdos -F 16 -c 8 -r 2 -m 0xF8 -A /dev/ada5s1 /dev/ada5s1: 57248 sectors in 7156 FAT16 clusters (4096 bytes/cluster) BytesPerSec=512 SecPerClust=8 ResSectors=2 FATs=2 RootDirEnts=512 Sectors=57344 Media=0xf8 FATsecs=28 SecPerTrack=63 Heads=16 HiddenSecs=0 Looking at the changes of D15672, I think -r should be blocked when -A is passed so it should be checking if (o.reserved_sectors) errx(1, "align (-A) is incompatible with -r"); instead of if (o.hidden_sectors_set) errx(1, "align (-A) is incompatible with -r");
A commit references this bug: Author: delphij Date: Tue Dec 3 07:01:28 UTC 2019 New revision: 355317 URL: https://svnweb.freebsd.org/changeset/base/355317 Log: newfs_msdos: -A is incompatible with -r, not -o. PR: 242314 Submitted by: Guy Yur <guyyur gmail com> MFC after: 2 weeks Changes: head/sbin/newfs_msdos/newfs_msdos.c
Committed, thanks!
A commit references this bug: Author: delphij Date: Wed Dec 18 08:08:52 UTC 2019 New revision: 355877 URL: https://svnweb.freebsd.org/changeset/base/355877 Log: MFC r355317: newfs_msdos: -A is incompatible with -r, not -o. PR: 242314 Submitted by: Guy Yur <guyyur gmail com> Changes: _U stable/12/ stable/12/sbin/newfs_msdos/newfs_msdos.c
A commit references this bug: Author: dim Date: Tue Feb 4 19:15:58 UTC 2020 New revision: 357516 URL: https://svnweb.freebsd.org/changeset/base/357516 Log: MFC r351382 (by delphij): When creating a new FAT32 filesystem, use "unknown" (0xFFFFFFFF) for FSI_Nxt_Free instead of providing a wrong value. With this change, fsck_msdosfs would no longer complain about invalid FSInfo information. MFC r355317 (by delphij): newfs_msdos: -A is incompatible with -r, not -o. PR: 242314 Submitted by: Guy Yur <guyyur gmail com> MFC r357227: Merge r357225 from the clang1000-import branch: Fix the following -Werror warning from clang 10.0.0 in newfs_msdos: sbin/newfs_msdos/newfs_msdos.c:181:2: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation] if (o.align) { ^ sbin/newfs_msdos/newfs_msdos.c:179:5: note: previous statement is here if (argc < 1 || argc > 2) ^ Changes: _U stable/11/ stable/11/sbin/newfs_msdos/mkfs_msdos.c stable/11/sbin/newfs_msdos/newfs_msdos.c