Initialize the si_bsize fields for the MFS bogodevices.
(This broke MFS rootfs and thereby installation)
This commit is contained in:
parent
c1df7a7420
commit
cb5eef8f2b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=50316
@ -31,7 +31,7 @@
|
|||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* @(#)mfs_vfsops.c 8.11 (Berkeley) 6/19/95
|
* @(#)mfs_vfsops.c 8.11 (Berkeley) 6/19/95
|
||||||
* $Id: mfs_vfsops.c,v 1.65 1999/07/17 18:43:49 phk Exp $
|
* $Id: mfs_vfsops.c,v 1.66 1999/07/20 09:47:55 phk Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -206,6 +206,7 @@ mfs_mount(mp, path, data, ndp, p)
|
|||||||
struct mfsnode *mfsp;
|
struct mfsnode *mfsp;
|
||||||
size_t size;
|
size_t size;
|
||||||
int flags, err;
|
int flags, err;
|
||||||
|
dev_t dev;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Use NULL path to flag a root mount
|
* Use NULL path to flag a root mount
|
||||||
@ -330,6 +331,10 @@ mfs_mount(mp, path, data, ndp, p)
|
|||||||
goto error_1;
|
goto error_1;
|
||||||
}
|
}
|
||||||
devvp->v_type = VBLK;
|
devvp->v_type = VBLK;
|
||||||
|
dev = make_dev(&mfs_cdevsw, mfs_minor, 0, 0, 0, "MFS%d", mfs_minor);
|
||||||
|
dev->si_bsize_phys = DEV_BSIZE;
|
||||||
|
dev->si_bsize_best = BLKDEV_IOSIZE;
|
||||||
|
dev->si_bsize_max = MAXBSIZE;
|
||||||
if (checkalias(devvp, makeudev(253, mfs_minor++), (struct mount *)0))
|
if (checkalias(devvp, makeudev(253, mfs_minor++), (struct mount *)0))
|
||||||
panic("mfs_mount: dup dev");
|
panic("mfs_mount: dup dev");
|
||||||
devvp->v_data = mfsp;
|
devvp->v_data = mfsp;
|
||||||
@ -481,13 +486,19 @@ static int
|
|||||||
mfs_init(vfsp)
|
mfs_init(vfsp)
|
||||||
struct vfsconf *vfsp;
|
struct vfsconf *vfsp;
|
||||||
{
|
{
|
||||||
|
|
||||||
cdevsw_add(&mfs_cdevsw);
|
cdevsw_add(&mfs_cdevsw);
|
||||||
#ifdef MFS_ROOT
|
#ifdef MFS_ROOT
|
||||||
if (bootverbose)
|
if (bootverbose)
|
||||||
printf("Considering MFS root f/s.\n");
|
printf("Considering MFS root f/s.\n");
|
||||||
if (mfs_getimage()) {
|
if (mfs_getimage()) {
|
||||||
mountrootfsname = "mfs";
|
mountrootfsname = "mfs";
|
||||||
rootdev = makedev(253, mfs_minor++);
|
rootdev = make_dev(&mfs_cdevsw, mfs_minor,
|
||||||
|
0, 0, 0, "MFS%d", mfs_minor);
|
||||||
|
rootdev->si_bsize_phys = DEV_BSIZE;
|
||||||
|
rootdev->si_bsize_best = BLKDEV_IOSIZE;
|
||||||
|
rootdev->si_bsize_max = MAXBSIZE;
|
||||||
|
mfs_minor++;
|
||||||
} else if (bootverbose)
|
} else if (bootverbose)
|
||||||
printf("No MFS image available as root f/s.\n");
|
printf("No MFS image available as root f/s.\n");
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user