aboutsummaryrefslogtreecommitdiff
path: root/sbin/mount_hpfs/mount_hpfs.c
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_hpfs/mount_hpfs.c
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_hpfs/mount_hpfs.c')
-rw-r--r--sbin/mount_hpfs/mount_hpfs.c37
1 files changed, 2 insertions, 35 deletions
diff --git a/sbin/mount_hpfs/mount_hpfs.c b/sbin/mount_hpfs/mount_hpfs.c
index 1b360cbfd950..67f03399f632 100644
--- a/sbin/mount_hpfs/mount_hpfs.c
+++ b/sbin/mount_hpfs/mount_hpfs.c
@@ -66,14 +66,9 @@ main(argc, argv)
{
struct hpfs_args args;
struct stat sb;
- int c, mntflags, set_gid, set_uid, set_mask,error;
+ int c, mntflags, set_gid, set_uid, set_mask;
int forcerw = 0;
char *dev, *dir, ndir[MAXPATHLEN+1];
-#if __FreeBSD_version >= 300000
- struct vfsconf vfc;
-#else
- struct vfsconf *vfc;
-#endif
mntflags = set_gid = set_uid = set_mask = 0;
(void)memset(&args, '\0', sizeof(args));
@@ -148,35 +143,7 @@ main(argc, argv)
args.mode = sb.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO);
}
-#if __FreeBSD_version >= 300000
- error = getvfsbyname("hpfs", &vfc);
- if(error && vfsisloadable("hpfs")) {
- if(vfsload("hpfs"))
-#else
- vfc = getvfsbyname("hpfs");
- if(!vfc && vfsisloadable("hpfs")) {
- if(vfsload("hpfs"))
-#endif
- err(EX_OSERR, "vfsload(hpfs)");
- endvfsent(); /* clear cache */
-#if __FreeBSD_version >= 300000
- error = getvfsbyname("hpfs", &vfc);
-#else
- vfc = getvfsbyname("hpfs");
-#endif
- }
-#if __FreeBSD_version >= 300000
- if (error)
-#else
- if (!vfc)
-#endif
- errx(EX_OSERR, "hpfs filesystem is not available");
-
-#if __FreeBSD_version >= 300000
- if (mount(vfc.vfc_name, dir, mntflags, &args) < 0)
-#else
- if (mount(vfc->vfc_index, dir, mntflags, &args) < 0)
-#endif
+ if (mount("hpfs", dir, mntflags, &args) < 0)
err(EX_OSERR, "%s", dev);
exit (0);