svn commit: r307748 - in stable/11: sbin/mount_msdosfs sys/fs/msdosfs

Alan Somers asomers at FreeBSD.org
Fri Oct 21 18:57:59 UTC 2016


Author: asomers
Date: Fri Oct 21 18:57:58 2016
New Revision: 307748
URL: https://svnweb.freebsd.org/changeset/base/307748

Log:
  MFC r306276, but don't remove findwin95
  
  Mount msdosfs with longnames support by default.
  
  The old behavior depended on the FAT version and on what files were in the
  root directory. "mount_msdosfs -o shortnames" is still supported.

Modified:
  stable/11/sbin/mount_msdosfs/mount_msdosfs.8
  stable/11/sys/fs/msdosfs/msdosfs_vfsops.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sbin/mount_msdosfs/mount_msdosfs.8
==============================================================================
--- stable/11/sbin/mount_msdosfs/mount_msdosfs.8	Fri Oct 21 18:54:56 2016	(r307747)
+++ stable/11/sbin/mount_msdosfs/mount_msdosfs.8	Fri Oct 21 18:57:58 2016	(r307748)
@@ -142,15 +142,8 @@ If neither
 nor
 .Fl l
 are given,
-.Nm
-searches the root directory of the file system to
-be mounted for any existing Win'95 long filenames.
-If no such entries are found, but short DOS filenames are found,
-.Fl s
-is the default.
-Otherwise
 .Fl l
-is assumed.
+is the default.
 .It Fl 9
 Ignore the special Win'95 directory entries even
 if deleting or renaming a file.

Modified: stable/11/sys/fs/msdosfs/msdosfs_vfsops.c
==============================================================================
--- stable/11/sys/fs/msdosfs/msdosfs_vfsops.c	Fri Oct 21 18:54:56 2016	(r307747)
+++ stable/11/sys/fs/msdosfs/msdosfs_vfsops.c	Fri Oct 21 18:57:58 2016	(r307748)
@@ -175,24 +175,8 @@ update_mp(struct mount *mp, struct threa
 
 	if (pmp->pm_flags & MSDOSFSMNT_NOWIN95)
 		pmp->pm_flags |= MSDOSFSMNT_SHORTNAME;
-	else if (!(pmp->pm_flags &
-	    (MSDOSFSMNT_SHORTNAME | MSDOSFSMNT_LONGNAME))) {
-		struct vnode *rootvp;
-
-		/*
-		 * Try to divine whether to support Win'95 long filenames
-		 */
-		if (FAT32(pmp))
-			pmp->pm_flags |= MSDOSFSMNT_LONGNAME;
-		else {
-			if ((error =
-			    msdosfs_root(mp, LK_EXCLUSIVE, &rootvp)) != 0)
-				return error;
-			pmp->pm_flags |= findwin95(VTODE(rootvp)) ?
-			    MSDOSFSMNT_LONGNAME : MSDOSFSMNT_SHORTNAME;
-			vput(rootvp);
-		}
-	}
+	else
+		pmp->pm_flags |= MSDOSFSMNT_LONGNAME;
 	return 0;
 }
 


More information about the svn-src-stable mailing list