- yc->yc_nxrec = bdbtofsb(bp->b_blkno);
-}
-
-cyread(dev, uio)
- dev_t dev;
- struct uio *uio;
-{
- int errno;
-
- errno = cyphys(dev, uio);
- if (errno)
- return (errno);
- return (physio(cystrategy, &rcybuf[CYUNIT(dev)], dev, B_READ, minphys, uio));
-}
-
-cywrite(dev, uio)
- dev_t dev;
- struct uio *uio;
-{
- int errno;
-
- errno = cyphys(dev, uio);
- if (errno)
- return (errno);
- return (physio(cystrategy, &rcybuf[CYUNIT(dev)], dev, B_WRITE, minphys, uio));
-}
-
-/*
- * Check that a raw device exits.
- * If it does, set up the yc_blkno and yc_nxrec
- * so that the tape will appear positioned correctly.
- */
-cyphys(dev, uio)
- dev_t dev;
- struct uio *uio;
-{
- register int ycunit = YCUNIT(dev);
- register daddr_t a;
- register struct yc_softc *yc;
- register struct vba_device *vi;
-
- if (ycunit >= NYC || (vi = ycdinfo[ycunit]) == 0 || vi->ui_alive == 0)
- return (ENXIO);
- yc = &yc_softc[ycunit];
- a = bdbtofsb(uio->uio_offset >> DEV_BSHIFT);
- yc->yc_blkno = a;
- yc->yc_nxrec = a + 1;
- return (0);