diff options
author | bde <bde@FreeBSD.org> | 1995-12-14 19:51:15 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1995-12-14 19:51:15 +0000 |
commit | 0755e57c15ebdc556978aaa281b5819c2a999e19 (patch) | |
tree | 7c64b83013e518794257dfa932505df9a8ea8add /sys | |
parent | 93209d9d82f9f4af9b19ef144fe74ba9d7cc483d (diff) | |
download | FreeBSD-src-0755e57c15ebdc556978aaa281b5819c2a999e19.zip FreeBSD-src-0755e57c15ebdc556978aaa281b5819c2a999e19.tar.gz |
Moved prototypes to better places.
Fixed indentation of some function headers.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/scsi/ch.c | 34 | ||||
-rw-r--r-- | sys/scsi/pt.c | 11 | ||||
-rw-r--r-- | sys/scsi/sctarg.c | 14 |
3 files changed, 28 insertions, 31 deletions
diff --git a/sys/scsi/ch.c b/sys/scsi/ch.c index f4f32d4..a5e406b 100644 --- a/sys/scsi/ch.c +++ b/sys/scsi/ch.c @@ -2,7 +2,7 @@ * Written by grefen@convex.com (probably moved by now) * Based on scsi drivers by Julian Elischer (julian@tfs.com) * - * $Id: ch.c,v 1.27 1995/12/08 23:22:19 phk Exp $ + * $Id: ch.c,v 1.28 1995/12/14 09:54:21 phk Exp $ */ #include <sys/types.h> @@ -27,16 +27,6 @@ #include <scsi/scsi_changer.h> #include <scsi/scsiconf.h> - - -static errval ch_getelem __P((u_int32 unit, short *stat, int type, - u_int32 from, void *data, u_int32 flags)); -static errval ch_move __P((u_int32 unit, short *stat, u_int32 chm, - u_int32 from, u_int32 to, u_int32 flags)); -static errval ch_mode_sense __P((u_int32 unit, u_int32 flags)); -static errval ch_position __P((u_int32 unit, short *stat, u_int32 chm, - u_int32 to, u_int32 flags)); - #define CHRETRIES 2 #define CHUNIT(DEV) ((minor(DEV)&0xF0) >> 4) /* 4 bit unit. */ @@ -65,15 +55,23 @@ struct scsi_data { #endif }; +static errval ch_getelem __P((u_int32 unit, short *stat, int type, u_int32 from, + void *data, u_int32 flags)); +static errval ch_move __P((u_int32 unit, short *stat, u_int32 chm, u_int32 from, + u_int32 to, u_int32 flags)); +static errval ch_mode_sense __P((u_int32 unit, u_int32 flags)); +static errval ch_position __P((u_int32 unit, short *stat, u_int32 chm, + u_int32 to, u_int32 flags)); + static int chunit(dev_t dev) { return CHUNIT(dev); } static dev_t chsetunit(dev_t dev, int unit) { return CHSETUNIT(dev, unit); } static errval ch_open(dev_t dev, int flags, int fmt, struct proc *p, - struct scsi_link *sc_link); + struct scsi_link *sc_link); static errval ch_ioctl(dev_t dev, int cmd, caddr_t addr, int flag, - struct proc *p, struct scsi_link *sc_link); + struct proc *p, struct scsi_link *sc_link); static errval ch_close(dev_t dev, int flag, int fmt, struct proc *p, - struct scsi_link *sc_link); + struct scsi_link *sc_link); static d_open_t chopen; static d_close_t chclose; @@ -144,7 +142,7 @@ ch_registerdev(int unit) * The routine called by the low level scsi routine when it discovers * a device suitable for this driver. */ -errval +static errval chattach(struct scsi_link *sc_link) { u_int32 unit; @@ -180,7 +178,7 @@ chattach(struct scsi_link *sc_link) */ static errval ch_open(dev_t dev, int flags, int fmt, struct proc *p, -struct scsi_link *sc_link) + struct scsi_link *sc_link) { errval errcode = 0; u_int32 unit, mode; @@ -241,8 +239,8 @@ ch_close(dev_t dev, int flag, int fmt, struct proc *p, * Knows about the internals of this device */ static errval -ch_ioctl(dev_t dev, int cmd, caddr_t arg, int mode, -struct proc *p, struct scsi_link *sc_link) +ch_ioctl(dev_t dev, int cmd, caddr_t arg, int mode, struct proc *p, + struct scsi_link *sc_link) { /* struct ch_cmd_buf *args; */ unsigned char unit; diff --git a/sys/scsi/pt.c b/sys/scsi/pt.c index 5012c61..7f459a1 100644 --- a/sys/scsi/pt.c +++ b/sys/scsi/pt.c @@ -37,7 +37,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: pt.c,v 1.10 1995/12/08 23:22:23 phk Exp $ + * $Id: pt.c,v 1.11 1995/12/14 09:54:24 phk Exp $ */ /* @@ -58,15 +58,10 @@ #include <scsi/scsi_all.h> #include <scsi/scsiconf.h> - struct scsi_data { struct buf_queue_head buf_queue; }; -static void ptstart(u_int32 unit, u_int32 flags); -static void pt_strategy(struct buf *bp, struct scsi_link *sc_link); -static int pt_sense(struct scsi_xfer *scsi_xfer); - static d_open_t ptopen; static d_close_t ptclose; static d_ioctl_t ptioctl; @@ -80,6 +75,9 @@ static struct cdevsw pt_cdevsw = SCSI_DEVICE_ENTRIES(pt) +static void ptstart(u_int32 unit, u_int32 flags); +static void pt_strategy(struct buf *bp, struct scsi_link *sc_link); +static int pt_sense(struct scsi_xfer *scsi_xfer); static struct scsi_device pt_switch = { @@ -103,6 +101,7 @@ static struct scsi_device pt_switch = 0, pt_strategy, }; + /* * ptstart looks to see if there is a buf waiting for the device * and that the device is not already busy. If both are true, diff --git a/sys/scsi/sctarg.c b/sys/scsi/sctarg.c index e1cef28..1b60d4c 100644 --- a/sys/scsi/sctarg.c +++ b/sys/scsi/sctarg.c @@ -37,7 +37,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: sctarg.c,v 1.10 1995/12/08 23:22:24 phk Exp $ + * $Id: sctarg.c,v 1.11 1995/12/14 09:54:32 phk Exp $ */ /* @@ -66,11 +66,6 @@ struct scsi_data { int flags; /* Already open */ }; -static errval sctarg_open(dev_t dev, int flags, int fmt, struct proc *p, -struct scsi_link *sc_link); -static void sctargstart(u_int32 unit, u_int32 unused_flags); -static void sctarg_strategy(struct buf *bp, struct scsi_link *sc_link); - static d_open_t sctargopen; static d_close_t sctargclose; static d_ioctl_t sctargioctl; @@ -84,6 +79,11 @@ static struct cdevsw sctarg_cdevsw = SCSI_DEVICE_ENTRIES(sctarg) +static errval sctarg_open(dev_t dev, int flags, int fmt, struct proc *p, + struct scsi_link *sc_link); +static void sctargstart(u_int32 unit, u_int32 unused_flags); +static void sctarg_strategy(struct buf *bp, struct scsi_link *sc_link); + static struct scsi_device sctarg_switch = { NULL, @@ -109,7 +109,7 @@ static struct scsi_device sctarg_switch = static errval sctarg_open(dev_t dev, int flags, int fmt, struct proc *p, -struct scsi_link *sc_link) + struct scsi_link *sc_link) { int ret = 0; |