summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorasomers <asomers@FreeBSD.org>2016-10-21 17:39:05 +0000
committerasomers <asomers@FreeBSD.org>2016-10-21 17:39:05 +0000
commit9a7af5e94c7a69deab3c51867e8e2593435aebb6 (patch)
treecb464f55411b3cdaf041213062ff1067e08690cb
parentf3d3b426252ca7aa76484fe603d01df457faf187 (diff)
downloadFreeBSD-src-9a7af5e94c7a69deab3c51867e8e2593435aebb6.zip
FreeBSD-src-9a7af5e94c7a69deab3c51867e8e2593435aebb6.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 7c6d3ed..b3875e7 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