aboutsummaryrefslogtreecommitdiff
path: root/sbin/mount_unionfs/mount_unionfs.c
diff options
context:
space:
mode:
authorGarrett Wollman <wollman@FreeBSD.org>1994-09-22 22:17:02 +0000
committerGarrett Wollman <wollman@FreeBSD.org>1994-09-22 22:17:02 +0000
commitd599144d24b887e1736c0e5470d56248bcc45160 (patch)
treeeae3d93fb9be635a1496c02de15cdef92b491f86 /sbin/mount_unionfs/mount_unionfs.c
parent42477d75d038de2ef2d8cbb77644f63f56d2076f (diff)
downloadsrc-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_unionfs/mount_unionfs.c')
-rw-r--r--sbin/mount_unionfs/mount_unionfs.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sbin/mount_unionfs/mount_unionfs.c b/sbin/mount_unionfs/mount_unionfs.c
index 90d075b1dec5..54d4df62a69b 100644
--- a/sbin/mount_unionfs/mount_unionfs.c
+++ b/sbin/mount_unionfs/mount_unionfs.c
@@ -73,6 +73,7 @@ main(argc, argv)
struct union_args args;
int ch, mntflags;
char target[MAXPATHLEN];
+ struct vfsconf *vfc;
mntflags = 0;
args.mntflags = UNMNT_ABOVE;
@@ -109,7 +110,15 @@ main(argc, argv)
args.target = target;
- if (mount(MOUNT_UNION, argv[1], mntflags, &args))
+ vfc = getvfsbyname("union");
+ if(!vfc && vfsisloadable("union")) {
+ if(vfsload("union"))
+ err(1, "vfsload(union)");
+ endvfsent(); /* flush cache */
+ vfc = getvfsbyname("union");
+ }
+
+ if (mount(vfc ? vfc->vfc_index : MOUNT_UNION, argv[1], mntflags, &args))
err(1, NULL);
exit(0);
}