diff options
author | wollman <wollman@FreeBSD.org> | 1994-09-22 22:17:02 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1994-09-22 22:17:02 +0000 |
commit | eeef7952c3836dd1eb5e994695d5c745b6b51784 (patch) | |
tree | eae3d93fb9be635a1496c02de15cdef92b491f86 /sbin/mount_nullfs | |
parent | d4b42cfe457790ba8db25f68e68f7c056ddc69b5 (diff) | |
download | FreeBSD-src-eeef7952c3836dd1eb5e994695d5c745b6b51784.zip FreeBSD-src-eeef7952c3836dd1eb5e994695d5c745b6b51784.tar.gz |
Automatically load NFS and a bevy of other filesystems.
Diffstat (limited to 'sbin/mount_nullfs')
-rw-r--r-- | sbin/mount_nullfs/mount_nullfs.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sbin/mount_nullfs/mount_nullfs.c b/sbin/mount_nullfs/mount_nullfs.c index e8c26df..d042359 100644 --- a/sbin/mount_nullfs/mount_nullfs.c +++ b/sbin/mount_nullfs/mount_nullfs.c @@ -72,6 +72,7 @@ main(argc, argv) struct null_args args; int ch, mntflags; char target[MAXPATHLEN]; + struct vfsconf *vfc; mntflags = 0; while ((ch = getopt(argc, argv, "o:")) != EOF) @@ -98,7 +99,15 @@ main(argc, argv) args.target = target; - if (mount(MOUNT_NULL, argv[1], mntflags, &args)) + vfc = getvfsbyname("null"); + if(!vfc && vfsisloadable("null")) { + if(vfsload("null")) + err(1, "vfsload(null)"); + endvfsent(); /* flush cache */ + vfc = getvfsbyname("null"); + } + + if (mount(vfc ? vfc->vfc_index : MOUNT_NULL, argv[1], mntflags, &args)) err(1, NULL); exit(0); } |