Fix a signed bug in the crashdump code for systems with > 2GB of ram.
Reviewed by: peter
This commit is contained in:
parent
42cf4af882
commit
d745b728a2
@ -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 */
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
|
@ -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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user