usr.sbin/makefs: Add FAT support (taken from FreeBSD) Basically same as FreeBSD version, except that several denode functions (that makefs(8) is trying to override kernel ones using the same name) have slightly different arguments in DragonFly. This commit adds #ifdef MAKEFS here and there in sys/vfs/msdosfs/*.h, which is the same in FreeBSD makefs(8). FreeBSD makefs(8) now uses m_buf and m_vnode instead of overriding kernel structs (using that they can't be included in userspace), but DragonFly still uses buf and vnode defined in makefs(8).
sys/vfs/msdosfs: Remove DragonFly specific macro de_off2cn() 4afd80f1a2 contains several fixes, but from the way de_cluster() is used, an explicitly casted version of de_cluster() shouldn't be needed. Note that maximum cluster# (and file relative cluster# too) in FAT12/16/32 is much smaller than maximum int32_t value. Note that maximum file size in FAT12/16/32 is < 4GiB.
sys/vfs/msdosfs: Sync comments on cluster macros with FreeBSD Use a terminology "filesystem relative" instead of "device relative". "device relative" is actually better, but the entire code use "filesystem relative". Other descriptions are obvious if one knows FAT ondisk format. Reduce unneeded diffs against FreeBSD.