newfs_msdos(8) creates faulty filesystems

2013-10-21 Thread Kenneth R Westerback
While harmless it seesm pointless to create a filesystem that generates warnings when fsck'd. So check for -1 (an allowed value) in FSFree and FSNext fields, and set FSNext to -1 in newfs_msdos, rather than setting it to a value sure to be not a free cluster. Anybody know of reasons to not do

newfs_msdos(8) creates faulty filesystems

2013-10-20 Thread David Vasek
Hello, a filesystem created by newfs_msdos(8) is reported as faulty by fsck_msdos(8). And it is indeed. Repeatable. There must be something wrong. The media itself (a USB flash drive) doesn't have any issues. # newfs -t msdos /dev/rsd4i /dev/rsd4i: 31224352 sectors in 3903044 FAT32 clusters

Re: newfs_msdos(8) creates faulty filesystems

2013-10-20 Thread Kenneth Westerback
Neither field is required. 'Free Space' in fsinfo can be -1 or just wrong, and 'Next Free Cluster' is a hint only. Hence in either case you can fix them up, or ignore their incorrectness and the filesystem is still considered ok. And since they are not required I guess newfs never bothered to