diff options
author | ps <ps@FreeBSD.org> | 2001-11-13 01:08:54 +0000 |
---|---|---|
committer | ps <ps@FreeBSD.org> | 2001-11-13 01:08:54 +0000 |
commit | d745b728a2c2707cc3b46c02356335f659c74895 (patch) | |
tree | 81568898dc6253eda96665fd068f2b22e8e882c0 | |
parent | 42cf4af882cddb6aef7dc5394d7c6d7abf14fab8 (diff) | |
download | FreeBSD-src-d745b728a2c2707cc3b46c02356335f659c74895.zip FreeBSD-src-d745b728a2c2707cc3b46c02356335f659c74895.tar.gz |
Fix a signed bug in the crashdump code for systems with > 2GB of ram.
Reviewed by: peter
-rw-r--r-- | sys/cam/scsi/scsi_da.c | 2 | ||||
-rw-r--r-- | sys/dev/aac/aac_disk.c | 2 | ||||
-rw-r--r-- | sys/dev/ata/ata-disk.c | 2 | ||||
-rw-r--r-- | sys/dev/ida/ida_disk.c | 2 | ||||
-rw-r--r-- | sys/dev/twe/twe_freebsd.c | 2 | ||||
-rw-r--r-- | sys/kern/kern_shutdown.c | 4 | ||||
-rw-r--r-- | sys/sys/systm.h | 2 |
7 files changed, 8 insertions, 8 deletions
diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index 2563752..d299e5a 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -798,7 +798,7 @@ dadump(dev_t dev) return(EIO); } - if (dumpstatus(addr, (long)(num * softc->params.secsize)) < 0) + if (dumpstatus(addr, (off_t)num * softc->params.secsize) < 0) return (EINTR); /* update block count */ diff --git a/sys/dev/aac/aac_disk.c b/sys/dev/aac/aac_disk.c index 77f8469..5144e32 100644 --- a/sys/dev/aac/aac_disk.c +++ b/sys/dev/aac/aac_disk.c @@ -268,7 +268,7 @@ retry: return (error); if (!error) { - if (dumpstatus(addr, (long)(count * DEV_BSIZE)) < 0) + if (dumpstatus(addr, (off_t)count * DEV_BSIZE) < 0) return (EINTR); blkno += blkcnt * dumppages; diff --git a/sys/dev/ata/ata-disk.c b/sys/dev/ata/ata-disk.c index e711715..062aed5 100644 --- a/sys/dev/ata/ata-disk.c +++ b/sys/dev/ata/ata-disk.c @@ -349,7 +349,7 @@ addump(dev_t dev) DELAY(20); } - if (dumpstatus(addr, (long)(count * DEV_BSIZE)) < 0) + if (dumpstatus(addr, (off_t)count * DEV_BSIZE) < 0) return EINTR; blkno += blkcnt * dumppages; diff --git a/sys/dev/ida/ida_disk.c b/sys/dev/ida/ida_disk.c index a545cf2..620f771 100644 --- a/sys/dev/ida/ida_disk.c +++ b/sys/dev/ida/ida_disk.c @@ -225,7 +225,7 @@ idad_dump(dev_t dev) if (error) return (error); - if (dumpstatus(addr, (long)(count * DEV_BSIZE)) < 0) + if (dumpstatus(addr, (off_t)count * DEV_BSIZE) < 0) return (EINTR); blkno += blkcnt * dumppages; diff --git a/sys/dev/twe/twe_freebsd.c b/sys/dev/twe/twe_freebsd.c index 3543913..242950d 100644 --- a/sys/dev/twe/twe_freebsd.c +++ b/sys/dev/twe/twe_freebsd.c @@ -719,7 +719,7 @@ twed_dump(dev_t dev) return(error); - if (dumpstatus(addr, (long)(count * DEV_BSIZE)) < 0) + if (dumpstatus(addr, (off_t)count * DEV_BSIZE) < 0) return(EINTR); blkno += blkcnt * dumppages; diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c index 4686134..648e438 100644 --- a/sys/kern/kern_shutdown.c +++ b/sys/kern/kern_shutdown.c @@ -544,7 +544,7 @@ dumpsys(void) } int -dumpstatus(vm_offset_t addr, long count) +dumpstatus(vm_offset_t addr, off_t count) { int c; @@ -553,7 +553,7 @@ dumpstatus(vm_offset_t addr, long count) if (wdog_tickler) (*wdog_tickler)(); #endif - printf("%ld ", count / (1024 * 1024)); + printf("%ld ", (long)(count / (1024 * 1024))); } if ((c = cncheckc()) == 0x03) diff --git a/sys/sys/systm.h b/sys/sys/systm.h index 56b5958..55cf1f8 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -110,7 +110,7 @@ struct _jmp_buf; int setjmp __P((struct _jmp_buf *)); void longjmp __P((struct _jmp_buf *, int)) __dead2; void Debugger __P((const char *msg)); -int dumpstatus __P((vm_offset_t addr, long count)); +int dumpstatus __P((vm_offset_t addr, off_t count)); int nullop __P((void)); int eopnotsupp __P((void)); int einval __P((void)); |