This lets you specify "gemdosfs", "shortnames", "longnames", and
"nowin95" as arguments to the "-o" flag, as alternatives to "-G", "-s", "-l", and "-9"; when running "mount_msdos" by hand, that doesn't let you do anything you couldn't already do, but if you're letting "mount" run it, it lets you specify those options, which is especially useful if, for example, you have an entry in "/etc/fstab" for some file system, with "noauto" set, so you can conveniently mount a DOS partition from a removable drive and force it to treat the file system as VFAT rather than boring old FAT. Submitted by: Guy Harris <guy@netapp.com>
This commit is contained in:
parent
ac88d62d8f
commit
458cbc01d2
@ -28,7 +28,7 @@
|
||||
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
.\"
|
||||
.\" $Id: mount_msdos.8,v 1.14 1998/06/30 06:23:41 charnier Exp $
|
||||
.\" $Id: mount_msdos.8,v 1.15 1999/01/11 18:35:14 dt Exp $
|
||||
.\"
|
||||
.Dd April 7, 1994
|
||||
.Dt MOUNT_MSDOS 8
|
||||
@ -72,7 +72,14 @@ The options are as follows:
|
||||
Use the specified mount
|
||||
.Ar options ,
|
||||
as described in
|
||||
.Xr mount 8 .
|
||||
.Xr mount 8 ,
|
||||
or one of the MSDOS filesystem-specific options
|
||||
.Ar shortnames ,
|
||||
.Ar longnames
|
||||
or
|
||||
.Ar nowin95 ,
|
||||
all of which can be used to affect Windows name translation in the
|
||||
underlying filesystem.
|
||||
.It Fl u Ar uid
|
||||
Set the owner of the files in the file system to
|
||||
.Ar uid .
|
||||
|
@ -32,7 +32,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static const char rcsid[] =
|
||||
"$Id: mount_msdos.c,v 1.14 1998/02/23 16:49:16 ache Exp $";
|
||||
"$Id: mount_msdos.c,v 1.15 1998/06/30 06:23:42 charnier Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -54,11 +54,21 @@ static const char rcsid[] =
|
||||
|
||||
#include "mntopts.h"
|
||||
|
||||
/*
|
||||
* XXX - no way to specify "foo=<bar>"-type options; that's what we'd
|
||||
* want for "-u", "-g", "-m", "-L", and "-W".
|
||||
*/
|
||||
static struct mntopt mopts[] = {
|
||||
MOPT_STDOPTS,
|
||||
MOPT_FORCE,
|
||||
MOPT_SYNC,
|
||||
MOPT_UPDATE,
|
||||
#ifdef MSDOSFSMNT_GEMDOSFS
|
||||
{ "gemdosfs", 0, MSDOSFSMNT_GEMDOSFS, 1 },
|
||||
#endif
|
||||
{ "shortnames", 0, MSDOSFSMNT_SHORTNAME, 1 },
|
||||
{ "longnames", 0, MSDOSFSMNT_LONGNAME, 1 },
|
||||
{ "nowin95", 0, MSDOSFSMNT_NOWIN95, 1 },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
@ -121,7 +131,7 @@ main(argc, argv)
|
||||
args.flags |= MSDOSFSMNT_U2WTABLE;
|
||||
break;
|
||||
case 'o':
|
||||
getmntopts(optarg, mopts, &mntflags, 0);
|
||||
getmntopts(optarg, mopts, &mntflags, &args.flags);
|
||||
break;
|
||||
case '?':
|
||||
default:
|
||||
|
@ -28,7 +28,7 @@
|
||||
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
.\"
|
||||
.\" $Id: mount_msdos.8,v 1.14 1998/06/30 06:23:41 charnier Exp $
|
||||
.\" $Id: mount_msdos.8,v 1.15 1999/01/11 18:35:14 dt Exp $
|
||||
.\"
|
||||
.Dd April 7, 1994
|
||||
.Dt MOUNT_MSDOS 8
|
||||
@ -72,7 +72,14 @@ The options are as follows:
|
||||
Use the specified mount
|
||||
.Ar options ,
|
||||
as described in
|
||||
.Xr mount 8 .
|
||||
.Xr mount 8 ,
|
||||
or one of the MSDOS filesystem-specific options
|
||||
.Ar shortnames ,
|
||||
.Ar longnames
|
||||
or
|
||||
.Ar nowin95 ,
|
||||
all of which can be used to affect Windows name translation in the
|
||||
underlying filesystem.
|
||||
.It Fl u Ar uid
|
||||
Set the owner of the files in the file system to
|
||||
.Ar uid .
|
||||
|
@ -32,7 +32,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static const char rcsid[] =
|
||||
"$Id: mount_msdos.c,v 1.14 1998/02/23 16:49:16 ache Exp $";
|
||||
"$Id: mount_msdos.c,v 1.15 1998/06/30 06:23:42 charnier Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -54,11 +54,21 @@ static const char rcsid[] =
|
||||
|
||||
#include "mntopts.h"
|
||||
|
||||
/*
|
||||
* XXX - no way to specify "foo=<bar>"-type options; that's what we'd
|
||||
* want for "-u", "-g", "-m", "-L", and "-W".
|
||||
*/
|
||||
static struct mntopt mopts[] = {
|
||||
MOPT_STDOPTS,
|
||||
MOPT_FORCE,
|
||||
MOPT_SYNC,
|
||||
MOPT_UPDATE,
|
||||
#ifdef MSDOSFSMNT_GEMDOSFS
|
||||
{ "gemdosfs", 0, MSDOSFSMNT_GEMDOSFS, 1 },
|
||||
#endif
|
||||
{ "shortnames", 0, MSDOSFSMNT_SHORTNAME, 1 },
|
||||
{ "longnames", 0, MSDOSFSMNT_LONGNAME, 1 },
|
||||
{ "nowin95", 0, MSDOSFSMNT_NOWIN95, 1 },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
@ -121,7 +131,7 @@ main(argc, argv)
|
||||
args.flags |= MSDOSFSMNT_U2WTABLE;
|
||||
break;
|
||||
case 'o':
|
||||
getmntopts(optarg, mopts, &mntflags, 0);
|
||||
getmntopts(optarg, mopts, &mntflags, &args.flags);
|
||||
break;
|
||||
case '?':
|
||||
default:
|
||||
|
@ -28,7 +28,7 @@
|
||||
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
.\"
|
||||
.\" $Id: mount_msdos.8,v 1.14 1998/06/30 06:23:41 charnier Exp $
|
||||
.\" $Id: mount_msdos.8,v 1.15 1999/01/11 18:35:14 dt Exp $
|
||||
.\"
|
||||
.Dd April 7, 1994
|
||||
.Dt MOUNT_MSDOS 8
|
||||
@ -72,7 +72,14 @@ The options are as follows:
|
||||
Use the specified mount
|
||||
.Ar options ,
|
||||
as described in
|
||||
.Xr mount 8 .
|
||||
.Xr mount 8 ,
|
||||
or one of the MSDOS filesystem-specific options
|
||||
.Ar shortnames ,
|
||||
.Ar longnames
|
||||
or
|
||||
.Ar nowin95 ,
|
||||
all of which can be used to affect Windows name translation in the
|
||||
underlying filesystem.
|
||||
.It Fl u Ar uid
|
||||
Set the owner of the files in the file system to
|
||||
.Ar uid .
|
||||
|
@ -32,7 +32,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static const char rcsid[] =
|
||||
"$Id: mount_msdos.c,v 1.14 1998/02/23 16:49:16 ache Exp $";
|
||||
"$Id: mount_msdos.c,v 1.15 1998/06/30 06:23:42 charnier Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -54,11 +54,21 @@ static const char rcsid[] =
|
||||
|
||||
#include "mntopts.h"
|
||||
|
||||
/*
|
||||
* XXX - no way to specify "foo=<bar>"-type options; that's what we'd
|
||||
* want for "-u", "-g", "-m", "-L", and "-W".
|
||||
*/
|
||||
static struct mntopt mopts[] = {
|
||||
MOPT_STDOPTS,
|
||||
MOPT_FORCE,
|
||||
MOPT_SYNC,
|
||||
MOPT_UPDATE,
|
||||
#ifdef MSDOSFSMNT_GEMDOSFS
|
||||
{ "gemdosfs", 0, MSDOSFSMNT_GEMDOSFS, 1 },
|
||||
#endif
|
||||
{ "shortnames", 0, MSDOSFSMNT_SHORTNAME, 1 },
|
||||
{ "longnames", 0, MSDOSFSMNT_LONGNAME, 1 },
|
||||
{ "nowin95", 0, MSDOSFSMNT_NOWIN95, 1 },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
@ -121,7 +131,7 @@ main(argc, argv)
|
||||
args.flags |= MSDOSFSMNT_U2WTABLE;
|
||||
break;
|
||||
case 'o':
|
||||
getmntopts(optarg, mopts, &mntflags, 0);
|
||||
getmntopts(optarg, mopts, &mntflags, &args.flags);
|
||||
break;
|
||||
case '?':
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user