summaryrefslogtreecommitdiffstats
path: root/sys/ufs
diff options
context:
space:
mode:
authorjb <jb@FreeBSD.org>1999-05-24 00:27:12 +0000
committerjb <jb@FreeBSD.org>1999-05-24 00:27:12 +0000
commit0e5212b7920a09ba12a0c403f1bfd1b5abffe76d (patch)
tree31e7ae598a0f5fb5466bef2d042fe0879a79d83b /sys/ufs
parent3aec1640dfcf063d1ba62f7dcbb14a1c363fd828 (diff)
downloadFreeBSD-src-0e5212b7920a09ba12a0c403f1bfd1b5abffe76d.zip
FreeBSD-src-0e5212b7920a09ba12a0c403f1bfd1b5abffe76d.tar.gz
- Back out Luoqi's cdevsw stuff. It panics on my system and is not required.
- Fix an error message. - Do the MFS_ROOT setting of mountrootfsname in mfs_init() instead of cpu_rootconf(). - Set rootdev in mfs_init instead of later in mfs_mount() iff MFS_ROOT.
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/mfs/mfs_vfsops.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/sys/ufs/mfs/mfs_vfsops.c b/sys/ufs/mfs/mfs_vfsops.c
index e3eb25b..c9e2ae8 100644
--- a/sys/ufs/mfs/mfs_vfsops.c
+++ b/sys/ufs/mfs/mfs_vfsops.c
@@ -209,11 +209,10 @@ mfs_mount(mp, path, data, ndp, p)
mfs_rootbase = base;
mfs_rootsize = fs->fs_fsize * fs->fs_size;
- rootdev = makedev(255, mfs_minor++);
printf("rootfs is %ld Kbyte compiled in MFS\n",
mfs_rootsize/1024);
if ((err = bdevvp(rootdev, &rootvp))) {
- printf("mfs_mountroot: can't find rootvp");
+ printf("mfs_mount: can't find rootvp - ");
return (err);
}
@@ -453,8 +452,6 @@ mfs_statfs(mp, sbp, p)
return (error);
}
-static struct cdevsw mfs_cdevsw = {};
-
/*
* Memory based filesystem initialization.
*/
@@ -462,8 +459,14 @@ static int
mfs_init(vfsp)
struct vfsconf *vfsp;
{
- dev_t dev = NODEV;
- cdevsw_add(&dev, &mfs_cdevsw, NULL);
- cdevsw_add_generic(255, major(dev), &mfs_cdevsw);
+#ifdef MFS_ROOT
+ if (bootverbose)
+ printf("Considering MFS root f/s.\n");
+ if (mfs_getimage()) {
+ mountrootfsname = "mfs";
+ rootdev = makedev(255, mfs_minor++);
+ } else if (bootverbose)
+ printf("No MFS image available as root f/s.\n");
+#endif
return (0);
}
OpenPOWER on IntegriCloud