On Fri, Aug 07, 2020 at 12:59:00PM -0700, jo...@armadilloaerospace.com wrote: > Perform an explicit check for the unsupported exFAT MSDOS filesystem > instead of letting it fail mysteriously when it gets cluster sizes > of 0 from the normal fields. > > This causes mount_msdos to report: > mount_msdos: /dev/sd1i on /root/mnt: filesystem not supported by kernel > > Instead of the more obscure: > mount_msdos: /dev/sd1i on /root/mnt: Inapropriate file type or format > > Index: msdosfs_vfsops.c > =================================================================== > RCS file: /cvs/src/sys/msdosfs/msdosfs_vfsops.c,v > retrieving revision 1.93 > diff -u -p -r1.93 msdosfs_vfsops.c > --- msdosfs_vfsops.c 24 Jan 2020 03:49:34 -0000 1.93 > +++ msdosfs_vfsops.c 7 Aug 2020 19:52:04 -0000 > @@ -298,6 +298,12 @@ msdosfs_mountfs(struct vnode *devvp, str > b50 = (struct byte_bpb50 *)bsp->bs50.bsBPB; > b710 = (struct byte_bpb710 *)bsp->bs710.bsBPB; > > + /* No support for exFAT filesystems */ > + if (!strncmp("EXFAT", bsp->bs33.bsOemName, 5)) { > + error = EOPNOTSUPP; > + goto error_exit; > + } > + > pmp = malloc(sizeof *pmp, M_MSDOSFSMNT, M_WAITOK | M_ZERO); > pmp->pm_mountp = mp;
The microsoft specification states it is EXFAT followed by three spaces if (!memcmp("EXFAT ", bsp->bs33.bsOemName, 8)) { may be more suitable here. fsck_msdos(8) likely needs a change to bail early if exFAT is found as well.