summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorasomers <asomers@FreeBSD.org>2016-10-21 18:57:58 +0000
committerasomers <asomers@FreeBSD.org>2016-10-21 18:57:58 +0000
commit8c973e7e7a98f6d24f39ddcfacb75f8b0523e7a9 (patch)
treeb14e1d58eaa1b9b48dddacda574389ee6c06a469
parentc2f9073bfbd37a2aa547c38777209c5cd2a929b1 (diff)
downloadFreeBSD-src-8c973e7e7a98f6d24f39ddcfacb75f8b0523e7a9.zip
FreeBSD-src-8c973e7e7a98f6d24f39ddcfacb75f8b0523e7a9.tar.gz
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.
-rw-r--r--sbin/mount_msdosfs/mount_msdosfs.89
-rw-r--r--sys/fs/msdosfs/msdosfs_vfsops.c20
2 files changed, 3 insertions, 26 deletions
diff --git a/sbin/mount_msdosfs/mount_msdosfs.8 b/sbin/mount_msdosfs/mount_msdosfs.8
index 3e4b08d..9f39ffb 100644
--- a/sbin/mount_msdosfs/mount_msdosfs.8
+++ b/sbin/mount_msdosfs/mount_msdosfs.8
@@ -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.
diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c
index 63d60dd..9b42b20 100644
--- a/sys/fs/msdosfs/msdosfs_vfsops.c
+++ b/sys/fs/msdosfs/msdosfs_vfsops.c
@@ -175,24 +175,8 @@ update_mp(struct mount *mp, struct thread *td)
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;
}
OpenPOWER on IntegriCloud