summaryrefslogtreecommitdiffstats
path: root/sys/scsi/sd.c
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>1998-06-07 17:13:14 +0000
committerdfr <dfr@FreeBSD.org>1998-06-07 17:13:14 +0000
commit1d5f38ac2264102518a09c66a7b285f57e81e67e (patch)
tree83ce2f0e2b8041d2c933d3beffc1f4465ea5b929 /sys/scsi/sd.c
parent83423d0e5a4ad035e44392f0427cb39232031e45 (diff)
downloadFreeBSD-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/sd.c')
-rw-r--r--sys/scsi/sd.c12
1 files changed, 6 insertions, 6 deletions
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)
OpenPOWER on IntegriCloud