summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1995-12-14 01:36:19 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1995-12-14 01:36:19 +0000
commit3f75e6cadc0f2bd0ae6dcbcb6f84637169dde320 (patch)
tree6a38c82a0a20656017138a782ccc613b616ce9d2 /sbin
parent3dca9a674e68d750a9f0b19542059cb99336b341 (diff)
from ws@netbsd:
- Add support for Win'95 separate creation/modification/access timestamps - Re-introduce lowercase filenames for non-Win'95-filesystems
Diffstat (limited to 'sbin')
-rw-r--r--sbin/mount_msdos/mount_msdos.853
-rw-r--r--sbin/mount_msdos/mount_msdos.c15
2 files changed, 57 insertions, 11 deletions
diff --git a/sbin/mount_msdos/mount_msdos.8 b/sbin/mount_msdos/mount_msdos.8
index 8f9d9c9df99..6bf21b13bff 100644
--- a/sbin/mount_msdos/mount_msdos.8
+++ b/sbin/mount_msdos/mount_msdos.8
@@ -1,4 +1,4 @@
-.\" $NetBSD: mount_msdos.8,v 1.7 1995/03/18 14:57:36 cgd Exp $
+.\" $NetBSD: mount_msdos.8,v 1.9 1995/11/29 15:11:37 ws Exp $
.\"
.\" Copyright (c) 1993,1994 Christopher G. Demetriou
.\" All rights reserved.
@@ -40,6 +40,9 @@
.Op Fl u Ar uid
.Op Fl g Ar gid
.Op Fl m Ar mask
+.Op Fl s
+.Op Fl l
+.Op Fl 9
.Pa special
.Pa node
.Sh DESCRIPTION
@@ -91,6 +94,31 @@ Only the nine low-order bits of
are used.
The default mask is taken from the
directory on which the file system is being mounted.
+.It Fl s
+Force behaviour to
+ignore and not generate Win'95 long filenames.
+.It Fl l
+Force listing and generation of
+Win'95 long filenames
+and separate creation/modification/access dates.
+.Pp
+If neither
+.Fl s
+nor
+.Fl l
+are given,
+.Nm mount_msdos
+searches the root directory of the filesystem to
+be mounted for any existing Win'95 long filenames.
+If no such entries are found,
+.Fl s
+is the default. Otherwise
+.Fl l
+is assumed.
+.It Fl 9
+Ignore the special Win'95 directory entries even
+if deleting or renaming a file. This forces
+.Fl s .
.El
.Sh SEE ALSO
.Xr mount 2 ,
@@ -98,14 +126,23 @@ directory on which the file system is being mounted.
.Xr fstab 5 ,
.Xr mount 8
.Sh CAVEATS
-The
-.Nm msdos
-filesystem is not known to work reliably with filesystems created by versions
-of MS-DOS later than version 3.3.
+The use of the
+.Fl 9
+flag could result in damaged filesystems,
+albeit the damage is in part taken care of by
+procedures similar to the ones used in Win'95.
+.Pp
+The default handling for
+.Fl s
+and
+.Fl l
+will result in empty filesystems to be populated
+with short filenames only. To generate long filenames
+on empty DOS filesystems use
+.Fl l .
.Pp
-The limitations on file names imposed by MS-DOS are strange, at best.
-For instance, they are
-limited to single-case, 8 character names with 3 character extensions.
+Note that Win'95 handles only access dates,
+but not access times.
.Sh HISTORY
The
.Nm mount_msdos
diff --git a/sbin/mount_msdos/mount_msdos.c b/sbin/mount_msdos/mount_msdos.c
index 16ec67fad91..7e0a9c42cc9 100644
--- a/sbin/mount_msdos/mount_msdos.c
+++ b/sbin/mount_msdos/mount_msdos.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mount_msdos.c,v 1.10 1995/03/18 14:57:38 cgd Exp $ */
+/* $NetBSD: mount_msdos.c,v 1.11 1995/10/15 15:35:48 ws Exp $ */
/*
* Copyright (c) 1994 Christopher G. Demetriou
@@ -31,7 +31,7 @@
*/
#ifndef lint
-static char rcsid[] = "$NetBSD: mount_msdos.c,v 1.10 1995/03/18 14:57:38 cgd Exp $";
+static char rcsid[] = "$NetBSD: mount_msdos.c,v 1.11 1995/10/15 15:35:48 ws Exp $";
#endif /* not lint */
#include <sys/cdefs.h>
@@ -72,8 +72,17 @@ main(argc, argv)
mntflags = set_gid = set_uid = set_mask = 0;
(void)memset(&args, '\0', sizeof(args));
- while ((c = getopt(argc, argv, "u:g:m:o:")) != EOF) {
+ while ((c = getopt(argc, argv, "sl9u:g:m:o:")) != EOF) {
switch (c) {
+ case 's':
+ args.flags |= MSDOSFSMNT_SHORTNAME;
+ break;
+ case 'l':
+ args.flags |= MSDOSFSMNT_LONGNAME;
+ break;
+ case '9':
+ args.flags |= MSDOSFSMNT_NOWIN95;
+ break;
case 'u':
args.uid = a_uid(optarg);
set_uid = 1;