1 /*-
2 * Copyright (c) 1982, 1986, 1990, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.
9 *
10 * %sccs.include.redist.c%
11 *
12 * from: @(#)kern_physio.c 8.1 (Berkeley) 6/10/93
13 */
14
15 #include <sys/param.h>
16 #include <sys/systm.h>
17 #include <sys/buf.h>
18 #include <sys/conf.h>
19 #include <sys/proc.h>
20
21 physio(a1, a2, a3, a4, a5, a6)
22 int (*a1)();
23 struct buf *a2;
24 dev_t a3;
25 int a4;
26 u_int (*a5)();
27 struct uio *a6;
28 {
29
30 /*
31 * Body deleted.
32 */
33 return (EIO);
34 }
35
36 u_int
minphys(a1)37 minphys(a1)
38 struct buf *a1;
39 {
40
41 /*
42 * Body deleted.
43 */
44 return (0);
45 }
46
47 /*
48 * Do a read on a device for a user process.
49 */
rawread(dev,uio)50 rawread(dev, uio)
51 dev_t dev;
52 struct uio *uio;
53 {
54 return (physio(cdevsw[major(dev)].d_strategy, (struct buf *)NULL,
55 dev, B_READ, minphys, uio));
56 }
57
58 /*
59 * Do a write on a device for a user process.
60 */
rawwrite(dev,uio)61 rawwrite(dev, uio)
62 dev_t dev;
63 struct uio *uio;
64 {
65 return (physio(cdevsw[major(dev)].d_strategy, (struct buf *)NULL,
66 dev, B_WRITE, minphys, uio));
67 }
68