summaryrefslogtreecommitdiffstats
path: root/sbin/mount_hpfs
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_hpfs
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_hpfs')
-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 1b360cb..67f0339 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);
OpenPOWER on IntegriCloud