From 7f79e0b14a5e8b99418d156f26b7b4026a163eca Mon Sep 17 00:00:00 2001 From: phk Date: Fri, 7 May 1999 07:03:47 +0000 Subject: Introduce two functions: physread() and physwrite() and use these directly in *devsw[] rather than the 46 local copies of the same functions. (grog will do the same for vinum when he has time) --- sys/kern/kern_physio.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'sys/kern/kern_physio.c') diff --git a/sys/kern/kern_physio.c b/sys/kern/kern_physio.c index 5406d92..c2cbb69 100644 --- a/sys/kern/kern_physio.c +++ b/sys/kern/kern_physio.c @@ -16,7 +16,7 @@ * 4. Modifications may be freely made to this file if the above conditions * are met. * - * $Id: kern_physio.c,v 1.31 1999/04/06 03:04:47 peter Exp $ + * $Id: kern_physio.c,v 1.32 1999/05/06 20:00:25 phk Exp $ */ #include @@ -33,6 +33,18 @@ static void physwakeup __P((struct buf *bp)); static struct buf * phygetvpbuf(dev_t dev, int resid); int +physread(dev_t dev, struct uio *uio, int ioflag) +{ + return(physio(cdevsw[major(dev)]->d_strategy, NULL, dev, 1, minphys, uio)); +} + +int +physwrite(dev_t dev, struct uio *uio, int ioflag) +{ + return(physio(cdevsw[major(dev)]->d_strategy, NULL, dev, 0, minphys, uio)); +} + +int physio(strategy, bp, dev, rw, minp, uio) d_strategy_t *strategy; struct buf *bp; -- cgit v1.1