diff options
author | Garrett Wollman <wollman@FreeBSD.org> | 1994-09-22 22:17:02 +0000 |
---|---|---|
committer | Garrett Wollman <wollman@FreeBSD.org> | 1994-09-22 22:17:02 +0000 |
commit | d599144d24b887e1736c0e5470d56248bcc45160 (patch) | |
tree | eae3d93fb9be635a1496c02de15cdef92b491f86 /sbin/mount_msdos/mount_msdos.c | |
parent | 42477d75d038de2ef2d8cbb77644f63f56d2076f (diff) | |
download | src-d599144d24b887e1736c0e5470d56248bcc45160.tar.gz src-d599144d24b887e1736c0e5470d56248bcc45160.zip |
Automatically load NFS and a bevy of other filesystems.
Notes
Notes:
svn path=/head/; revision=2999
Diffstat (limited to 'sbin/mount_msdos/mount_msdos.c')
-rw-r--r-- | sbin/mount_msdos/mount_msdos.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sbin/mount_msdos/mount_msdos.c b/sbin/mount_msdos/mount_msdos.c index 075a5127d6c9..9cac3ff694b5 100644 --- a/sbin/mount_msdos/mount_msdos.c +++ b/sbin/mount_msdos/mount_msdos.c @@ -29,7 +29,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: mount_msdos.c,v 1.8 1994/07/16 21:32:08 cgd Exp $"; +static char rcsid[] = "$Id: mount_msdos.c,v 1.1 1994/09/19 15:30:36 dfr Exp $"; #endif /* not lint */ #include <sys/cdefs.h> @@ -67,6 +67,7 @@ main(argc, argv) struct stat sb; int c, mntflags, set_gid, set_uid, set_mask; char *dev, *dir, ndir[MAXPATHLEN+1]; + struct vfsconf *vfc; mntflags = set_gid = set_uid = set_mask = 0; (void)memset(&args, '\0', sizeof(args)); @@ -128,7 +129,15 @@ main(argc, argv) args.mask = sb.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO); } - if (mount(MOUNT_MSDOS, dir, mntflags, &args) < 0) + vfc = getvfsbyname("msdos"); + if(!vfc && vfsisloadable("msdos")) { + if(vfsload("msdos")) + err(1, "vfsload(msdos)"); + endvfsent(); /* clear cache */ + vfc = getvfsbyname("msdos"); + } + + if (mount(vfc ? vfc->vfc_index : MOUNT_MSDOS, dir, mntflags, &args) < 0) err(1, "mount"); exit (0); |