| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: dkvar.h,v 1.13 2008/04/28 20:23:46 martin Exp $ */ | | 1 | /* $NetBSD: dkvar.h,v 1.14 2009/08/07 00:07:39 dyoung Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 2002 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 2002 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to The NetBSD Foundation | | 7 | * This code is derived from software contributed to The NetBSD Foundation |
8 | * by Roland C. Dowdeswell. | | 8 | * by Roland C. Dowdeswell. |
9 | * | | 9 | * |
10 | * Redistribution and use in source and binary forms, with or without | | 10 | * Redistribution and use in source and binary forms, with or without |
11 | * modification, are permitted provided that the following conditions | | 11 | * modification, are permitted provided that the following conditions |
12 | * are met: | | 12 | * are met: |
13 | * 1. Redistributions of source code must retain the above copyright | | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | | 14 | * notice, this list of conditions and the following disclaimer. |
| @@ -75,29 +75,29 @@ struct dk_softc { | | | @@ -75,29 +75,29 @@ struct dk_softc { |
75 | * should be a single static structure per pseudo-disk driver. | | 75 | * should be a single static structure per pseudo-disk driver. |
76 | * We only define the functions that we currently need. | | 76 | * We only define the functions that we currently need. |
77 | */ | | 77 | */ |
78 | struct dk_intf { | | 78 | struct dk_intf { |
79 | int di_dtype; /* disk type */ | | 79 | int di_dtype; /* disk type */ |
80 | const char *di_dkname; /* disk type name */ | | 80 | const char *di_dkname; /* disk type name */ |
81 | int (*di_open)(dev_t, int, int, struct lwp *); | | 81 | int (*di_open)(dev_t, int, int, struct lwp *); |
82 | int (*di_close)(dev_t, int, int, struct lwp *); | | 82 | int (*di_close)(dev_t, int, int, struct lwp *); |
83 | void (*di_strategy)(struct buf *); | | 83 | void (*di_strategy)(struct buf *); |
84 | int (*di_diskstart)(struct dk_softc *, struct buf *); | | 84 | int (*di_diskstart)(struct dk_softc *, struct buf *); |
85 | }; | | 85 | }; |
86 | | | 86 | |
87 | #define DK_BUSY(_dksc, _pmask) \ | | 87 | #define DK_BUSY(_dksc, _pmask) \ |
88 | ((_dksc)->sc_dkdev.dk_openmask & ~(_pmask)) || \ | | 88 | (((_dksc)->sc_dkdev.dk_openmask & ~(_pmask)) || \ |
89 | ((_dksc)->sc_dkdev.dk_bopenmask & (_pmask) && \ | | 89 | ((_dksc)->sc_dkdev.dk_bopenmask & (_pmask) && \ |
90 | ((_dksc)->sc_dkdev.dk_copenmask & (_pmask))) | | 90 | ((_dksc)->sc_dkdev.dk_copenmask & (_pmask)))) |
91 | | | 91 | |
92 | /* | | 92 | /* |
93 | * Functions that are exported to the pseudo disk implementations: | | 93 | * Functions that are exported to the pseudo disk implementations: |
94 | */ | | 94 | */ |
95 | | | 95 | |
96 | void dk_sc_init(struct dk_softc *, void *, const char *); | | 96 | void dk_sc_init(struct dk_softc *, void *, const char *); |
97 | | | 97 | |
98 | int dk_open(struct dk_intf *, struct dk_softc *, dev_t, | | 98 | int dk_open(struct dk_intf *, struct dk_softc *, dev_t, |
99 | int, int, struct lwp *); | | 99 | int, int, struct lwp *); |
100 | int dk_close(struct dk_intf *, struct dk_softc *, dev_t, | | 100 | int dk_close(struct dk_intf *, struct dk_softc *, dev_t, |
101 | int, int, struct lwp *); | | 101 | int, int, struct lwp *); |
102 | void dk_strategy(struct dk_intf *, struct dk_softc *, struct buf *); | | 102 | void dk_strategy(struct dk_intf *, struct dk_softc *, struct buf *); |
103 | void dk_start(struct dk_intf *, struct dk_softc *); | | 103 | void dk_start(struct dk_intf *, struct dk_softc *); |