From eeef7952c3836dd1eb5e994695d5c745b6b51784 Mon Sep 17 00:00:00 2001 From: wollman Date: Thu, 22 Sep 1994 22:17:02 +0000 Subject: Automatically load NFS and a bevy of other filesystems. --- sbin/mount_null/mount_null.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'sbin/mount_null') diff --git a/sbin/mount_null/mount_null.c b/sbin/mount_null/mount_null.c index e8c26df..d042359 100644 --- a/sbin/mount_null/mount_null.c +++ b/sbin/mount_null/mount_null.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); } -- cgit v1.1