diff options
author | dfr <dfr@FreeBSD.org> | 1998-06-07 17:13:14 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 1998-06-07 17:13:14 +0000 |
commit | 1d5f38ac2264102518a09c66a7b285f57e81e67e (patch) | |
tree | 83ce2f0e2b8041d2c933d3beffc1f4465ea5b929 /sys/scsi | |
parent | 83423d0e5a4ad035e44392f0427cb39232031e45 (diff) | |
download | FreeBSD-src-1d5f38ac2264102518a09c66a7b285f57e81e67e.zip FreeBSD-src-1d5f38ac2264102518a09c66a7b285f57e81e67e.tar.gz |
This commit fixes various 64bit portability problems required for
FreeBSD/alpha. The most significant item is to change the command
argument to ioctl functions from int to u_long. This change brings us
inline with various other BSD versions. Driver writers may like to
use (__FreeBSD_version == 300003) to detect this change.
The prototype FreeBSD/alpha machdep will follow in a couple of days
time.
Diffstat (limited to 'sys/scsi')
-rw-r--r-- | sys/scsi/cd.c | 6 | ||||
-rw-r--r-- | sys/scsi/ch.c | 6 | ||||
-rw-r--r-- | sys/scsi/od.c | 6 | ||||
-rw-r--r-- | sys/scsi/scsi_ioctl.c | 4 | ||||
-rw-r--r-- | sys/scsi/scsiconf.h | 8 | ||||
-rw-r--r-- | sys/scsi/sd.c | 12 | ||||
-rw-r--r-- | sys/scsi/ssc.c | 4 | ||||
-rw-r--r-- | sys/scsi/st.c | 6 | ||||
-rw-r--r-- | sys/scsi/su.c | 4 | ||||
-rw-r--r-- | sys/scsi/worm.c | 6 |
10 files changed, 31 insertions, 31 deletions
diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c index cd08d10..ec9937e 100644 --- a/sys/scsi/cd.c +++ b/sys/scsi/cd.c @@ -14,7 +14,7 @@ * * Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992 * - * $Id: cd.c,v 1.91 1998/04/17 22:37:06 des Exp $ + * $Id: cd.c,v 1.92 1998/04/27 11:36:04 des Exp $ */ #include "opt_bounce.h" @@ -119,7 +119,7 @@ static dev_t cdsetunit(dev_t dev, int unit) { return CDSETUNIT(dev, unit); } static errval cd_open(dev_t dev, int flags, int fmt, struct proc *p, struct scsi_link *sc_link); -static errval cd_ioctl(dev_t dev, int cmd, caddr_t addr, int flag, +static errval cd_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p, struct scsi_link *sc_link); static errval cd_close(dev_t dev, int flag, int fmt, struct proc *p, struct scsi_link *sc_link); @@ -581,7 +581,7 @@ cdstart(unit, flags) * Knows about the internals of this device */ static errval -cd_ioctl(dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p, +cd_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p, struct scsi_link *sc_link) { errval error = 0; diff --git a/sys/scsi/ch.c b/sys/scsi/ch.c index ecab879..985011f 100644 --- a/sys/scsi/ch.c +++ b/sys/scsi/ch.c @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ch.c,v 1.44 1998/04/16 12:28:30 peter Exp $ + * $Id: ch.c,v 1.45 1998/05/06 09:11:20 phk Exp $ */ #include "opt_devfs.h" @@ -132,7 +132,7 @@ static dev_t chsetunit __P((dev_t, int)); /* So, like, why not "int"? */ static errval ch_devopen __P((dev_t, int, int, struct proc *, struct scsi_link *)); -static errval ch_devioctl __P((dev_t, int, caddr_t, int, struct proc *, +static errval ch_devioctl __P((dev_t, u_long, caddr_t, int, struct proc *, struct scsi_link *)); static errval ch_devclose __P((dev_t, int, int, struct proc *, struct scsi_link *)); @@ -293,7 +293,7 @@ ch_devclose(dev, flags, fmt, p, link) static errval ch_devioctl(dev, cmd, data, flags, p, link) dev_t dev; - int cmd; + u_long cmd; caddr_t data; int flags; struct proc *p; diff --git a/sys/scsi/od.c b/sys/scsi/od.c index f91d29b..1811121 100644 --- a/sys/scsi/od.c +++ b/sys/scsi/od.c @@ -28,7 +28,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $Id: od.c,v 1.37 1998/04/17 22:37:07 des Exp $ + * $Id: od.c,v 1.38 1998/04/27 11:36:04 des Exp $ */ /* @@ -128,7 +128,7 @@ static int odunit(dev_t dev) { return ODUNIT(dev); } static errval od_open __P((dev_t dev, int mode, int fmt, struct proc *p, struct scsi_link *sc_link)); -static errval od_ioctl(dev_t dev, int cmd, caddr_t addr, int flag, +static errval od_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p, struct scsi_link *sc_link); static errval od_close __P((dev_t dev, int fflag, int fmt, struct proc *p, struct scsi_link *sc_link)); @@ -666,7 +666,7 @@ bad: * Knows about the internals of this device */ static errval -od_ioctl(dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p, +od_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p, struct scsi_link *sc_link) { /* struct od_cmd_buf *args; */ diff --git a/sys/scsi/scsi_ioctl.c b/sys/scsi/scsi_ioctl.c index 086f426..4d5b94c 100644 --- a/sys/scsi/scsi_ioctl.c +++ b/sys/scsi/scsi_ioctl.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. *End copyright * - * $Id: scsi_ioctl.c,v 1.29 1998/02/01 18:09:46 wollman Exp $ + * $Id: scsi_ioctl.c,v 1.30 1998/03/28 10:33:21 bde Exp $ * * */ @@ -249,7 +249,7 @@ scsistrategy(struct buf *bp) * If user-level type command, we must still be running * in the context of the calling process */ -errval scsi_do_ioctl(dev_t dev, int cmd, caddr_t addr, int flags, +errval scsi_do_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p, struct scsi_link *sc_link) { errval ret = 0; diff --git a/sys/scsi/scsiconf.h b/sys/scsi/scsiconf.h index 1092b4d..6961077 100644 --- a/sys/scsi/scsiconf.h +++ b/sys/scsi/scsiconf.h @@ -14,7 +14,7 @@ * * Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992 * - * $Id: scsiconf.h,v 1.59 1998/04/17 22:37:09 des Exp $ + * $Id: scsiconf.h,v 1.60 1998/05/24 04:52:31 julian Exp $ */ #ifndef SCSI_SCSICONF_H #define SCSI_SCSICONF_H 1 @@ -146,7 +146,7 @@ struct scsi_device /* 64*/ dev_t (*setunit)(dev_t dev, int unit); /* 68*/ int (*dev_open)(dev_t dev, int flags, int fmt, struct proc *p, struct scsi_link *sc_link); -/* 72*/ int (*dev_ioctl)(dev_t dev, int cmd, caddr_t arg, int mode, +/* 72*/ int (*dev_ioctl)(dev_t dev, u_long cmd, caddr_t arg, int mode, struct proc *p, struct scsi_link *sc_link); /* 76*/ int (*dev_close)(dev_t dev, int flag, int fmt, struct proc *p, struct scsi_link *sc_link); @@ -178,7 +178,7 @@ void NAME##init(void) { \ static int NAME##open(dev_t dev, int flags, int fmt, struct proc *p) { \ return scsi_open(dev, flags, fmt, p, &NAME##_switch); \ } \ -static int NAME##ioctl(dev_t dev, int cmd, caddr_t addr, \ +static int NAME##ioctl(dev_t dev, u_long cmd, caddr_t addr, \ int flag, struct proc *p) { \ return scsi_ioctl(dev, cmd, addr, flag, p, &NAME##_switch); \ } \ @@ -453,7 +453,7 @@ errval scsi_scsi_cmd __P(( struct scsi_link *, struct scsi_generic *, u_int32_t, u_int32_t, u_int32_t, struct buf *, u_int32_t)); -int scsi_do_ioctl __P((dev_t dev, int cmd, caddr_t addr, int mode, +int scsi_do_ioctl __P((dev_t dev, u_long cmd, caddr_t addr, int mode, struct proc *p, struct scsi_link *sc_link)); struct scsi_link *scsi_link_get __P((int bus, int targ, int lun)); diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c index ce065ff..fcd8196 100644 --- a/sys/scsi/sd.c +++ b/sys/scsi/sd.c @@ -14,7 +14,7 @@ * * Ported to run under 386BSD by Julian Elischer (julian@dialix.oz.au) Sept 1992 * - * $Id: sd.c,v 1.128 1998/05/07 02:05:21 julian Exp $ + * $Id: sd.c,v 1.129 1998/05/07 12:13:47 julian Exp $ */ #include "opt_bounce.h" @@ -118,7 +118,7 @@ static int sdunit(dev_t dev) { return SDUNIT(dev); } static dev_t sdsetunit(dev_t dev, int unit) { return SDSETUNIT(dev, unit); } static errval sd_open __P((dev_t dev, int mode, int fmt, struct proc *p, struct scsi_link *sc_link)); -static errval sd_ioctl(dev_t dev, int cmd, caddr_t addr, int flag, +static errval sd_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p, struct scsi_link *sc_link); static errval sd_close __P((dev_t dev, int flag, int fmt, struct proc *p, struct scsi_link *sc_link)); @@ -778,10 +778,10 @@ bad: */ #ifdef SLICE static int -sdsioctl( void *private, int cmd, caddr_t addr, int flag, struct proc *p) +sdsioctl( void *private, u_long cmd, caddr_t addr, int flag, struct proc *p) #else /* SLICE */ static errval -sd_ioctl(dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p, +sd_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p, struct scsi_link *sc_link) #endif /* !SLICE */ { @@ -1244,7 +1244,7 @@ sdsdump(void *private, int32_t start, int32_t num) * If we are dumping core, it may take a while. * So reassure the user and hold off any watchdogs. */ - if ((unsigned)addr % (1024 * 1024) == 0) { + if ((u_long)addr % (1024 * 1024) == 0) { #ifdef HW_WDOG if (wdog_tickler) (*wdog_tickler)(); @@ -1254,7 +1254,7 @@ sdsdump(void *private, int32_t start, int32_t num) /* update block count */ num -= blkcnt; blknum += blkcnt; - (int) addr += blkcnt * sd->params.secsiz; + (long) addr += blkcnt * sd->params.secsiz; /* operator aborting dump? */ if (cncheckc() != -1) diff --git a/sys/scsi/ssc.c b/sys/scsi/ssc.c index 9ad707e..1014daa 100644 --- a/sys/scsi/ssc.c +++ b/sys/scsi/ssc.c @@ -49,7 +49,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. *End copyright - * $Id: ssc.c,v 1.17 1997/12/23 19:44:45 brian Exp $ + * $Id: ssc.c,v 1.18 1998/01/24 02:54:52 eivind Exp $ */ #include "opt_devfs.h" @@ -100,7 +100,7 @@ sscclose(dev_t dev, int fflag, int type, struct proc *p) } static int -sscioctl(dev_t dev, int cmd, caddr_t data, int fflag, struct proc *p) +sscioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct proc *p) { if (cmd == SCIOCADDR) { diff --git a/sys/scsi/st.c b/sys/scsi/st.c index 9da75d2..aa31ee6 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.86 1998/04/16 10:35:50 peter Exp $ + * $Id: st.c,v 1.87 1998/04/17 22:37:16 des Exp $ */ /* @@ -144,7 +144,7 @@ static dev_t stsetunit(dev_t dev, int unit) { return STSETUNIT(dev, unit); } static errval st_open(dev_t dev, int flags, int fmt, struct proc *p, struct scsi_link *sc_link); -static errval st_ioctl(dev_t dev, int cmd, caddr_t addr, int flag, +static errval st_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p, struct scsi_link *sc_link); static errval st_close(dev_t dev, int flag, int fmt, struct proc *p, struct scsi_link *sc_link); @@ -983,7 +983,7 @@ badnews: * knows about the internals of this device */ static errval -st_ioctl(dev_t dev, int cmd, caddr_t arg, int flag, +st_ioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct proc *p, struct scsi_link *sc_link) { errval errcode = 0; diff --git a/sys/scsi/su.c b/sys/scsi/su.c index 6f22606..29ab345 100644 --- a/sys/scsi/su.c +++ b/sys/scsi/su.c @@ -44,7 +44,7 @@ * SUCH DAMAGE. *End copyright * - * $Id: su.c,v 1.17 1997/09/02 20:06:40 bde Exp $ + * $Id: su.c,v 1.18 1997/09/14 03:19:40 peter Exp $ * * Tabstops 4 * XXX devfs entries for this device should be handled by generic scsiconfig @@ -243,7 +243,7 @@ sustrategy(struct buf *bp) } int -suioctl(dev_t dev, int cmd, caddr_t data, int fflag, struct proc *p) +suioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct proc *p) { struct cdevsw *cdev; dev_t base; diff --git a/sys/scsi/worm.c b/sys/scsi/worm.c index c8f7200..2142022 100644 --- a/sys/scsi/worm.c +++ b/sys/scsi/worm.c @@ -43,7 +43,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: worm.c,v 1.54 1998/04/15 17:47:24 bde Exp $ + * $Id: worm.c,v 1.55 1998/04/16 12:28:31 peter Exp $ */ #include "opt_bounce.h" @@ -134,7 +134,7 @@ static void wormstart(u_int32_t unit, u_int32_t flags); static errval worm_open(dev_t dev, int flags, int fmt, struct proc *p, struct scsi_link *sc_link); -static errval worm_ioctl(dev_t dev, int cmd, caddr_t addr, int flag, +static errval worm_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p, struct scsi_link *sc_link); static errval worm_close(dev_t dev, int flag, int fmt, struct proc *p, struct scsi_link *sc_link); @@ -631,7 +631,7 @@ worm_close(dev_t dev, int flags, int fmt, struct proc *p, * Knows about the internals of this device */ errval -worm_ioctl(dev_t dev, int cmd, caddr_t addr, int flag, struct proc *p, +worm_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p, struct scsi_link *sc_link) { errval error = 0; |