summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_physio.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-05-07 07:03:47 +0000
committerphk <phk@FreeBSD.org>1999-05-07 07:03:47 +0000
commit7f79e0b14a5e8b99418d156f26b7b4026a163eca (patch)
tree64910f3b88102ea4099d5b4c903f873d9a777b12 /sys/kern/kern_physio.c
parent87d0bb82afc01a49a3747975f2dda83e9e025bd1 (diff)
downloadFreeBSD-src-7f79e0b14a5e8b99418d156f26b7b4026a163eca.zip
FreeBSD-src-7f79e0b14a5e8b99418d156f26b7b4026a163eca.tar.gz
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)
Diffstat (limited to 'sys/kern/kern_physio.c')
-rw-r--r--sys/kern/kern_physio.c14
1 files changed, 13 insertions, 1 deletions
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 <sys/param.h>
@@ -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;
OpenPOWER on IntegriCloud