-/*
- * Raw interface for a read
- */
-utread(dev, uio)
- dev_t dev;
- struct uio *uio;
-{
- int errno;
-
- errno = utphys(dev, uio);
- if (errno)
- return (errno);
- return (physio(utstrategy, &rutbuf[UTUNIT(dev)], dev, B_READ, minphys, uio));
-}
-
-/*
- * Raw interface for a write
- */
-utwrite(dev, uio)
- dev_t dev;
- struct uio *uio;
-{
- int errno;
-
- errno = utphys(dev, uio);
- if (errno)
- return (errno);
- return (physio(utstrategy, &rutbuf[UTUNIT(dev)], dev, B_WRITE, minphys, uio));
-}
-
-/*
- * Check for valid device number dev and update our notion
- * of where we are on the tape
- */
-utphys(dev, uio)
- dev_t dev;
- struct uio *uio;
-{
- register int tjunit = TJUNIT(dev);
- register struct tj_softc *sc;
- register struct uba_device *ui;
-
- if (tjunit >= NTJ || (ui=tjdinfo[tjunit]) == 0 || ui->ui_alive == 0)
- return (ENXIO);
- sc = &tj_softc[tjunit];
- sc->sc_blkno = bdbtofsb(uio->uio_offset>>9);
- sc->sc_nxrec = sc->sc_blkno+1;
- return (0);
-}
-