aboutsummaryrefslogtreecommitdiff
path: root/sbin/mount_unionfs
diff options
context:
space:
mode:
authorMaxime Henrion <mux@FreeBSD.org>2002-08-03 16:03:21 +0000
committerMaxime Henrion <mux@FreeBSD.org>2002-08-03 16:03:21 +0000
commit526ba6d32b79b714f8c5cd54892d80b60b24f9a4 (patch)
tree767cb1c371d1f8a92f24d3039b035dc1af421bc6 /sbin/mount_unionfs
parent5740f28044897562fedf09bea0c6a547aa3701d4 (diff)
downloadsrc-526ba6d32b79b714f8c5cd54892d80b60b24f9a4.tar.gz
src-526ba6d32b79b714f8c5cd54892d80b60b24f9a4.zip
Now that the kernel is able to load modules itself,
remove all the code which was trying to do so. This code was nasty in several ways, it was hiding the kernel bug where the kernel was unable to properly load a module, and it was quitting if it wasn't able to load the module. The consequence is that an ABI breakage of the vfsconf API would have broken *every* mount utility.
Notes
Notes: svn path=/head/; revision=101270
Diffstat (limited to 'sbin/mount_unionfs')
-rw-r--r--sbin/mount_unionfs/mount_unionfs.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/sbin/mount_unionfs/mount_unionfs.c b/sbin/mount_unionfs/mount_unionfs.c
index 724c9b31cbb6..069e4fb10bd9 100644
--- a/sbin/mount_unionfs/mount_unionfs.c
+++ b/sbin/mount_unionfs/mount_unionfs.c
@@ -78,8 +78,7 @@ main(argc, argv)
int ch, mntflags;
char source[MAXPATHLEN];
char target[MAXPATHLEN];
- struct vfsconf vfc;
- int error, iovcnt;
+ int iovcnt;
iovcnt = 6;
mntflags = 0;
@@ -121,20 +120,10 @@ main(argc, argv)
errx(EX_USAGE, "%s (%s) and %s (%s) are not distinct paths",
argv[0], target, argv[1], source);
- error = getvfsbyname("unionfs", &vfc);
- if (error && vfsisloadable("unionfs")) {
- if (vfsload("unionfs"))
- err(EX_OSERR, "vfsload(unionfs)");
- endvfsent(); /* flush cache */
- error = getvfsbyname("unionfs", &vfc);
- }
- if (error)
- errx(EX_OSERR, "union filesystem is not available");
-
iov[0].iov_base = "fstype";
iov[0].iov_len = strlen(iov[0].iov_base) + 1;
- iov[1].iov_base = vfc.vfc_name;
- iov[1].iov_len = strlen(vfc.vfc_name) + 1;
+ iov[1].iov_base = "unionfs";
+ iov[1].iov_len = strlen(iov[1].iov_base) + 1;
iov[2].iov_base = "fspath";
iov[2].iov_len = strlen(iov[2].iov_base) + 1;
iov[3].iov_base = source;