diff options
author | phk <phk@FreeBSD.org> | 1996-07-21 09:28:03 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1996-07-21 09:28:03 +0000 |
commit | 31ff7912a40b9271d12eafac715f35179c6a2ab2 (patch) | |
tree | faf20b204c3768d4cb79649243100c99e9f76e05 /sys/geom/geom_ccd.c | |
parent | cc3250aa71545430de9fb5259f6fc809b22665a4 (diff) | |
download | FreeBSD-src-31ff7912a40b9271d12eafac715f35179c6a2ab2.zip FreeBSD-src-31ff7912a40b9271d12eafac715f35179c6a2ab2.tar.gz |
Substitute raw{read|write} for ccd{read|write}
Diffstat (limited to 'sys/geom/geom_ccd.c')
-rw-r--r-- | sys/geom/geom_ccd.c | 61 |
1 files changed, 2 insertions, 59 deletions
diff --git a/sys/geom/geom_ccd.c b/sys/geom/geom_ccd.c index 05451a9..3e1c366 100644 --- a/sys/geom/geom_ccd.c +++ b/sys/geom/geom_ccd.c @@ -1,4 +1,4 @@ -/* $Id: ccd.c,v 1.12 1996/05/13 09:17:42 asami Exp $ */ +/* $Id: ccd.c,v 1.13 1996/06/12 04:58:03 gpalmer Exp $ */ /* $NetBSD: ccd.c,v 1.22 1995/12/08 19:13:26 thorpej Exp $ */ @@ -190,7 +190,7 @@ static struct bdevsw ccd_bdevsw = { }; static struct cdevsw ccd_cdevsw = { - ccdopen, ccdclose, ccdread, ccdwrite, + ccdopen, ccdclose, rawread, rawwrite, ccdioctl, nostop, nullreset, nodevtotty, seltrue, nommap, ccdstrategy, "ccd", &ccd_bdevsw, -1 @@ -1019,63 +1019,6 @@ ccdiodone(cbp) splx(s); } -/* ARGSUSED */ -int -ccdread(dev, uio, flags) - dev_t dev; - struct uio *uio; - int flags; -{ - int unit = ccdunit(dev); - struct ccd_softc *cs; - -#ifdef DEBUG - if (ccddebug & CCDB_FOLLOW) - printf("ccdread(%x, %x)\n", dev, uio); -#endif - if (unit >= numccd) - return (ENXIO); - cs = &ccd_softc[unit]; - - if ((cs->sc_flags & CCDF_INITED) == 0) - return (ENXIO); - - /* - * XXX: It's not clear that using minphys() is completely safe, - * in particular, for raw I/O. Underlying devices might have some - * non-obvious limits, because of the copy to user-space. - */ - return (physio(ccdstrategy, NULL, dev, B_READ, minphys, uio)); -} - -/* ARGSUSED */ -int -ccdwrite(dev, uio, flags) - dev_t dev; - struct uio *uio; - int flags; -{ - int unit = ccdunit(dev); - struct ccd_softc *cs; - -#ifdef DEBUG - if (ccddebug & CCDB_FOLLOW) - printf("ccdwrite(%x, %x)\n", dev, uio); -#endif - if (unit >= numccd) - return (ENXIO); - cs = &ccd_softc[unit]; - - if ((cs->sc_flags & CCDF_INITED) == 0) - return (ENXIO); - - /* - * XXX: It's not clear that using minphys() is completely safe, - * in particular, for raw I/O. Underlying devices might have some - * non-obvious limits, because of the copy to user-space. - */ - return (physio(ccdstrategy, NULL, dev, B_WRITE, minphys, uio)); -} #ifdef CCD_DEBUG static void |