Convert the magic MFS device to a VCHR.

Detected by:	obrien
This commit is contained in:
Poul-Henning Kamp 2000-04-22 05:45:38 +00:00
parent bb529be712
commit a1da82154d
2 changed files with 5 additions and 7 deletions

View File

@ -242,7 +242,7 @@ mfs_mount(mp, path, data, ndp, p)
FREE(mfsp, M_MFSNODE);
goto error_1;
}
devvp->v_type = VBLK;
devvp->v_type = VCHR;
dev = make_dev(&mfs_cdevsw, mfs_minor, 0, 0, 0, "MFS%d", mfs_minor);
/* It is not clear that these will get initialized otherwise */
dev->si_bsize_phys = DEV_BSIZE;

View File

@ -104,10 +104,8 @@ mfs_open(ap)
} */ *ap;
{
if (ap->a_vp->v_type != VBLK) {
panic("mfs_open not VBLK");
/* NOTREACHED */
}
if (ap->a_vp->v_type != VCHR)
panic("mfs_open not VCHR");
return (0);
}
@ -141,7 +139,7 @@ mfs_freeblks(ap)
struct buf *bp;
struct vnode *vp;
if (!vfinddev(ap->a_vp->v_rdev, VBLK, &vp) || vp->v_usecount == 0)
if (!vfinddev(ap->a_vp->v_rdev, VCHR, &vp) || vp->v_usecount == 0)
panic("mfs_freeblks: bad dev");
bp = geteblk(ap->a_length);
@ -172,7 +170,7 @@ mfs_strategy(ap)
struct proc *p = curproc; /* XXX */
int s;
if (!vfinddev(bp->b_dev, VBLK, &vp) || vp->v_usecount == 0)
if (!vfinddev(bp->b_dev, VCHR, &vp) || vp->v_usecount == 0)
panic("mfs_strategy: bad dev");
mfsp = VTOMFS(vp);