summaryrefslogtreecommitdiffstats
path: root/sbin/mount_std
diff options
context:
space:
mode:
authormux <mux@FreeBSD.org>2002-08-03 16:03:21 +0000
committermux <mux@FreeBSD.org>2002-08-03 16:03:21 +0000
commitf72ce2f014de34b8615290f44d408be01938dd02 (patch)
tree767cb1c371d1f8a92f24d3039b035dc1af421bc6 /sbin/mount_std
parent3b6651b983ed2691da3bbc5b5c4cdc8cf4c65900 (diff)
downloadFreeBSD-src-f72ce2f014de34b8615290f44d408be01938dd02.zip
FreeBSD-src-f72ce2f014de34b8615290f44d408be01938dd02.tar.gz
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.
Diffstat (limited to 'sbin/mount_std')
-rw-r--r--sbin/mount_std/mount_std.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/sbin/mount_std/mount_std.c b/sbin/mount_std/mount_std.c
index 1113e67..00421a1 100644
--- a/sbin/mount_std/mount_std.c
+++ b/sbin/mount_std/mount_std.c
@@ -66,7 +66,7 @@ static struct mntopt mopts[] = {
{ NULL }
};
-static const char *fsname;
+static char *fsname;
static volatile sig_atomic_t caughtsig;
static void usage(void) __dead2;
@@ -84,7 +84,6 @@ main(argc, argv)
{
int ch, mntflags;
char mntpath[MAXPATHLEN];
- struct vfsconf vfc;
struct iovec iov[4];
int error;
@@ -120,23 +119,13 @@ main(argc, argv)
if (argc != 2)
usage();
- error = getvfsbyname(fsname, &vfc);
- if (error && vfsisloadable(fsname)) {
- if(vfsload(fsname))
- err(EX_OSERR, "vfsload(%s)", fsname);
- endvfsent();
- error = getvfsbyname(fsname, &vfc);
- }
- if (error)
- errx(EX_OSERR, "%s filesystem not available", fsname);
-
/* resolve the mountpoint with realpath(3) */
(void)checkpath(argv[1], mntpath);
iov[0].iov_base = "fstype";
iov[0].iov_len = sizeof("fstype");
- iov[1].iov_base = vfc.vfc_name;
- iov[1].iov_len = strlen(vfc.vfc_name) + 1;
+ iov[1].iov_base = fsname;
+ iov[1].iov_len = strlen(iov[1].iov_base) + 1;
iov[2].iov_base = "fspath";
iov[2].iov_len = sizeof("fstype");
iov[3].iov_base = mntpath;
@@ -161,7 +150,7 @@ main(argc, argv)
* or the user didn't recompile his kernel.
*/
if (error && (errno == EOPNOTSUPP || errno == ENOSYS || caughtsig))
- error = mount(vfc.vfc_name, mntpath, mntflags, NULL);
+ error = mount(fsname, mntpath, mntflags, NULL);
if (error)
err(EX_OSERR, NULL);
OpenPOWER on IntegriCloud