summaryrefslogtreecommitdiffstats
path: root/sbin/mount_procfs
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1994-09-22 22:17:02 +0000
committerwollman <wollman@FreeBSD.org>1994-09-22 22:17:02 +0000
commiteeef7952c3836dd1eb5e994695d5c745b6b51784 (patch)
treeeae3d93fb9be635a1496c02de15cdef92b491f86 /sbin/mount_procfs
parentd4b42cfe457790ba8db25f68e68f7c056ddc69b5 (diff)
downloadFreeBSD-src-eeef7952c3836dd1eb5e994695d5c745b6b51784.zip
FreeBSD-src-eeef7952c3836dd1eb5e994695d5c745b6b51784.tar.gz
Automatically load NFS and a bevy of other filesystems.
Diffstat (limited to 'sbin/mount_procfs')
-rw-r--r--sbin/mount_procfs/mount_procfs.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sbin/mount_procfs/mount_procfs.c b/sbin/mount_procfs/mount_procfs.c
index 79016c8..6beae7f 100644
--- a/sbin/mount_procfs/mount_procfs.c
+++ b/sbin/mount_procfs/mount_procfs.c
@@ -69,6 +69,7 @@ main(argc, argv)
char *argv[];
{
int ch, mntflags;
+ struct vfsconf *vfc;
mntflags = 0;
while ((ch = getopt(argc, argv, "o:")) != EOF)
@@ -86,7 +87,15 @@ main(argc, argv)
if (argc != 2)
usage();
- if (mount(MOUNT_PROCFS, argv[1], mntflags, NULL))
+ vfc = getvfsbyname("procfs");
+ if(!vfc && vfsisloadable("procfs")) {
+ if(vfsload("procfs"))
+ err(1, "vfsload(procfs)");
+ endvfsent(); /* flush cache */
+ vfc = getvfsbyname("procfs");
+ }
+
+ if (mount(vfc ? vfc->vfc_index : MOUNT_PROCFS, argv[1], mntflags, NULL))
err(1, NULL);
exit(0);
}
OpenPOWER on IntegriCloud