From b37f58736e1b6695334b3d44f8eb6f36dc46415a Mon Sep 17 00:00:00 2001 From: gibbs Date: Sun, 10 Mar 1996 07:13:15 +0000 Subject: Cleanse the SCSI subsystem of its internally defined types u_int32, u_int16, u_int8, int32, int16, int8. Use the system defined *_t types instead. --- sys/scsi/st.c | 158 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 79 insertions(+), 79 deletions(-) (limited to 'sys/scsi/st.c') diff --git a/sys/scsi/st.c b/sys/scsi/st.c index c227af9..972217e 100644 --- a/sys/scsi/st.c +++ b/sys/scsi/st.c @@ -12,7 +12,7 @@ * on the understanding that TFS is not responsible for the correct * functioning of this software in any circumstances. * - * $Id: st.c,v 1.61 1996/02/08 06:23:49 pst Exp $ + * $Id: st.c,v 1.62 1996/02/19 09:36:23 julian Exp $ */ /* @@ -71,26 +71,26 @@ #define SCSI_2_MAX_DENSITY_CODE 0x17 /* maximum density code specified * in SCSI II spec. */ -static errval st_space __P((u_int32 unit, int32 number, u_int32 what, u_int32 flags)); -static errval st_rewind __P((u_int32 unit, boolean immed, u_int32 flags)); -static errval st_erase __P((u_int32 unit, boolean immed, u_int32 flags)); -static errval st_mode_sense __P((u_int32 unit, u_int32 flags, \ - struct tape_pages *page, u_int32 pagelen, u_int32 pagecode)); -static errval st_decide_mode __P((u_int32 unit, boolean first_read)); -static errval st_read __P((u_int32 unit, char *buf, u_int32 size, - u_int32 flags)); -static errval st_rd_blk_lim __P((u_int32 unit, u_int32 flags)); -static errval st_touch_tape __P((u_int32 unit)); -static errval st_write_filemarks __P((u_int32 unit, int32 number, u_int32 flags)); -static errval st_load __P((u_int32 unit, u_int32 type, u_int32 flags)); -static errval st_mode_select __P((u_int32 unit, u_int32 flags, \ - struct tape_pages *page, u_int32 pagelen)); -static errval st_comp __P((u_int32 unit, u_int32 mode)); -static int32 st_chkeod __P((u_int32 unit, boolean position, int32 *nmarks, - u_int32 flags)); -static void ststart(u_int32 unit, u_int32 flags); +static errval st_space __P((u_int32_t unit, int32_t number, u_int32_t what, u_int32_t flags)); +static errval st_rewind __P((u_int32_t unit, boolean immed, u_int32_t flags)); +static errval st_erase __P((u_int32_t unit, boolean immed, u_int32_t flags)); +static errval st_mode_sense __P((u_int32_t unit, u_int32_t flags, \ + struct tape_pages *page, u_int32_t pagelen, u_int32_t pagecode)); +static errval st_decide_mode __P((u_int32_t unit, boolean first_read)); +static errval st_read __P((u_int32_t unit, char *buf, u_int32_t size, + u_int32_t flags)); +static errval st_rd_blk_lim __P((u_int32_t unit, u_int32_t flags)); +static errval st_touch_tape __P((u_int32_t unit)); +static errval st_write_filemarks __P((u_int32_t unit, int32_t number, u_int32_t flags)); +static errval st_load __P((u_int32_t unit, u_int32_t type, u_int32_t flags)); +static errval st_mode_select __P((u_int32_t unit, u_int32_t flags, \ + struct tape_pages *page, u_int32_t pagelen)); +static errval st_comp __P((u_int32_t unit, u_int32_t mode)); +static int32_t st_chkeod __P((u_int32_t unit, boolean position, int32_t *nmarks, + u_int32_t flags)); +static void ststart(u_int32_t unit, u_int32_t flags); static void st_unmount __P((int unit, boolean eject)); -static errval st_mount_tape __P((dev_t dev, u_int32 flags)); +static errval st_mount_tape __P((dev_t dev, u_int32_t flags)); static void st_loadquirks __P((struct scsi_link *sc_link)); static errval st_interpret_sense __P((struct scsi_xfer *xs)); @@ -100,24 +100,24 @@ static errval st_interpret_sense __P((struct scsi_xfer *xs)); struct scsi_data { /*--------------------present operating parameters, flags etc.----------------*/ - u_int32 flags; /* see below */ - u_int32 blksiz; /* blksiz we are using */ - u_int32 density; /* present density */ - u_int32 comp; /* present compression mode */ - u_int32 quirks; /* quirks for the open mode */ - u_int32 last_dsty; /* last density openned */ + u_int32_t flags; /* see below */ + u_int32_t blksiz; /* blksiz we are using */ + u_int32_t density; /* present density */ + u_int32_t comp; /* present compression mode */ + u_int32_t quirks; /* quirks for the open mode */ + u_int32_t last_dsty; /* last density openned */ /*--------------------parameters reported by the device ----------------------*/ - u_int32 blkmin; /* min blk size */ - u_int32 blkmax; /* max blk size */ + u_int32_t blkmin; /* min blk size */ + u_int32_t blkmax; /* max blk size */ /*--------------------parameters reported by the device for this media--------*/ - u_int32 numblks; /* nominal blocks capacity */ - u_int32 media_blksiz; /* 0 if not ST_FIXEDBLOCKS */ - u_int32 media_density; /* this is what it said when asked */ + u_int32_t numblks; /* nominal blocks capacity */ + u_int32_t media_blksiz; /* 0 if not ST_FIXEDBLOCKS */ + u_int32_t media_density; /* this is what it said when asked */ /*--------------------quirks for the whole drive------------------------------*/ - u_int32 drive_quirks; /* quirks of this drive */ + u_int32_t drive_quirks; /* quirks of this drive */ /*--------------------How we should set up when openning each minor device----*/ st_modes modes; /* plus more for each mode */ - u_int8 modeflags[4]; /* flags for the modes */ + u_int8_t modeflags[4]; /* flags for the modes */ #define DENSITY_SET_BY_USER 0x01 #define DENSITY_SET_BY_QUIRK 0x02 #define BLKSIZE_SET_BY_USER 0x04 @@ -131,7 +131,7 @@ struct scsi_data { */ struct buf_queue_head buf_queue; struct scsi_xfer scsi_xfer; /* scsi xfer struct for this drive */ - u_int32 xfer_block_wait; /* is a process waiting? */ + u_int32_t xfer_block_wait; /* is a process waiting? */ #ifdef DEVFS struct { void *rst; @@ -273,7 +273,7 @@ st_registerdev(int unit) static errval stattach(struct scsi_link *sc_link) { - u_int32 unit; + u_int32_t unit; #ifdef DEVFS char name[32]; #endif @@ -449,7 +449,7 @@ static errval st_open(dev_t dev, int flags, int fmt, struct proc *p, struct scsi_link *sc_link) { - u_int32 unit, mode, dsty; + u_int32_t unit, mode, dsty; errval errno = 0; struct scsi_data *st; @@ -537,7 +537,7 @@ static errval st_close(dev_t dev, int flag, int fmt, struct proc *p, struct scsi_link *sc_link) { - u_int32 unit, mode; + u_int32_t unit, mode; struct scsi_data *st; unit = STUNIT(dev); @@ -576,9 +576,9 @@ st_close(dev_t dev, int flag, int fmt, struct proc *p, static errval st_mount_tape(dev, flags) dev_t dev; - u_int32 flags; + u_int32_t flags; { - u_int32 unit, mode, dsty; + u_int32_t unit, mode, dsty; struct scsi_data *st; struct scsi_link *sc_link; errval errno = 0; @@ -682,7 +682,7 @@ st_unmount(int unit, boolean eject) { struct scsi_link *sc_link = SCSI_LINK(&st_switch, unit); struct scsi_data *st = sc_link->sd; - int32 nmarks; + int32_t nmarks; if (!(st->flags & ST_MOUNTED)) return; @@ -703,7 +703,7 @@ st_unmount(int unit, boolean eject) */ static errval st_decide_mode(unit, first_read) - u_int32 unit; + u_int32_t unit; boolean first_read; { struct scsi_link *sc_link = SCSI_LINK(&st_switch, unit); @@ -842,8 +842,8 @@ done: static void st_strategy(struct buf *bp, struct scsi_link *sc_link) { - u_int32 unit; - u_int32 opri; + u_int32_t unit; + u_int32_t opri; struct scsi_data *st; int len; @@ -940,8 +940,8 @@ done: */ static void ststart(unit, flags) - u_int32 unit; - u_int32 flags; + u_int32_t unit; + u_int32_t flags; { struct scsi_link *sc_link = SCSI_LINK(&st_switch, unit); struct scsi_data *st = sc_link->sd; @@ -1073,12 +1073,12 @@ st_ioctl(dev_t dev, int cmd, caddr_t arg, int flag, struct proc *p, struct scsi_link *sc_link) { errval errcode = 0; - u_int32 unit; - u_int32 number, flags, dsty; + u_int32_t unit; + u_int32_t number, flags, dsty; struct scsi_data *st; - u_int32 hold_blksiz; - u_int32 hold_density; - int32 nmarks; + u_int32_t hold_blksiz; + u_int32_t hold_density; + int32_t nmarks; struct mtop *mt = (struct mtop *) arg; /* @@ -1262,7 +1262,7 @@ try_new_value: */ static errval st_read(unit, buf, size, flags) - u_int32 unit, size, flags; + u_int32_t unit, size, flags; char *buf; { struct scsi_link *sc_link = SCSI_LINK(&st_switch, unit); @@ -1305,7 +1305,7 @@ st_read(unit, buf, size, flags) */ static errval st_rd_blk_lim(unit, flags) - u_int32 unit, flags; + u_int32_t unit, flags; { struct scsi_link *sc_link = SCSI_LINK(&st_switch, unit); struct scsi_data *st = sc_link->sd; @@ -1359,11 +1359,11 @@ st_rd_blk_lim(unit, flags) */ static errval st_mode_sense(unit, flags, page, pagelen, pagecode) - u_int32 unit, flags; + u_int32_t unit, flags; struct tape_pages *page; - u_int32 pagelen,pagecode; + u_int32_t pagelen,pagecode; { - u_int32 dat_len; + u_int32_t dat_len; errval errno; struct scsi_mode_sense scsi_cmd; struct { @@ -1447,11 +1447,11 @@ st_mode_sense(unit, flags, page, pagelen, pagecode) */ static errval st_mode_select(unit, flags, page, pagelen) - u_int32 unit, flags; + u_int32_t unit, flags; struct tape_pages *page; - u_int32 pagelen; + u_int32_t pagelen; { - u_int32 dat_len; + u_int32_t dat_len; struct scsi_mode_select scsi_cmd; struct { struct scsi_mode_header header; @@ -1514,7 +1514,7 @@ static int noisy_st = 0; \***************************************************************/ static errval st_comp(unit,mode) -u_int32 unit,mode; +u_int32_t unit,mode; { struct tape_pages page; int pagesize; @@ -1563,8 +1563,8 @@ u_int32 unit,mode; */ static errval st_space(unit, number, what, flags) - u_int32 unit, what, flags; - int32 number; + u_int32_t unit, what, flags; + int32_t number; { errval error; struct scsi_space scsi_cmd; @@ -1648,8 +1648,8 @@ st_space(unit, number, what, flags) */ static errval st_write_filemarks(unit, number, flags) - u_int32 unit, flags; - int32 number; + u_int32_t unit, flags; + int32_t number; { struct scsi_write_filemarks scsi_cmd; struct scsi_link *sc_link = SCSI_LINK(&st_switch, unit); @@ -1698,12 +1698,12 @@ st_write_filemarks(unit, number, flags) * nmarks returns the number of marks to skip (or, if position * true, which were skipped) to get back original position. */ -static int32 +static int32_t st_chkeod(unit, position, nmarks, flags) - u_int32 unit; + u_int32_t unit; boolean position; - int32 *nmarks; - u_int32 flags; + int32_t *nmarks; + u_int32_t flags; { errval error; struct scsi_data *st = SCSI_DATA(&st_switch, unit); @@ -1730,7 +1730,7 @@ st_chkeod(unit, position, nmarks, flags) */ static errval st_load(unit, type, flags) - u_int32 unit, type, flags; + u_int32_t unit, type, flags; { struct scsi_load scsi_cmd; struct scsi_link *sc_link = SCSI_LINK(&st_switch, unit); @@ -1739,7 +1739,7 @@ st_load(unit, type, flags) bzero(&scsi_cmd, sizeof(scsi_cmd)); if (type != LD_LOAD) { errval error; - int32 nmarks; + int32_t nmarks; error = st_chkeod(unit, FALSE, &nmarks, flags); if (error != ESUCCESS) @@ -1766,14 +1766,14 @@ st_load(unit, type, flags) */ static errval st_rewind(unit, immed, flags) - u_int32 unit, flags; + u_int32_t unit, flags; boolean immed; { struct scsi_rewind scsi_cmd; struct scsi_link *sc_link = SCSI_LINK(&st_switch, unit); struct scsi_data *st = sc_link->sd; errval error; - int32 nmarks; + int32_t nmarks; error = st_chkeod(unit, FALSE, &nmarks, flags); if (error != ESUCCESS) @@ -1798,14 +1798,14 @@ st_rewind(unit, immed, flags) */ static errval st_erase(unit, immed, flags) - u_int32 unit, flags; + u_int32_t unit, flags; boolean immed; { struct scsi_erase scsi_cmd; struct scsi_link *sc_link = SCSI_LINK(&st_switch, unit); struct scsi_data *st = sc_link->sd; errval error; - int32 nmarks; + int32_t nmarks; error = st_chkeod(unit, FALSE, &nmarks, flags); if (error != ESUCCESS) @@ -1847,16 +1847,16 @@ st_interpret_sense(xs) struct scsi_link *sc_link = xs->sc_link; struct scsi_sense_data *sense = &(xs->sense); boolean silent = xs->flags & SCSI_SILENT; - u_int32 unit = sc_link->dev_unit; + u_int32_t unit = sc_link->dev_unit; struct scsi_data *st = SCSI_DATA(&st_switch, unit); - u_int32 key; - int32 info; + u_int32_t key; + int32_t info; /* * Get the sense fields and work out what code */ if (sense->error_code & SSD_ERRCODE_VALID) { - info = ntohl(*((int32 *) sense->ext.extended.info)); + info = ntohl(*((int32_t *) sense->ext.extended.info)); } else { if (st->flags & ST_FIXEDBLOCKS) { info = xs->datalen / st->blksiz; @@ -1981,11 +1981,11 @@ st_interpret_sense(xs) */ static errval st_touch_tape(unit) - u_int32 unit; + u_int32_t unit; { struct scsi_data *st = SCSI_DATA(&st_switch, unit); char *buf; - u_int32 readsiz; + u_int32_t readsiz; errval errno; buf = malloc(1024, M_TEMP, M_NOWAIT); -- cgit v1.1