diff options
Diffstat (limited to 'sbin/mount_union')
-rw-r--r-- | sbin/mount_union/mount_union.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sbin/mount_union/mount_union.c b/sbin/mount_union/mount_union.c index 90d075b..54d4df6 100644 --- a/sbin/mount_union/mount_union.c +++ b/sbin/mount_union/mount_union.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); } |