'int dumpsize; /* memory size in bytes */' is not good for machines

with 2GB or more of ram.
This commit is contained in:
Peter Wemm 2001-06-08 03:06:24 +00:00
parent a45d1cc148
commit 1c08773e6e

View File

@ -104,7 +104,7 @@ struct nlist dump_nl[] = { /* Name list for dumped system. */
/* Types match kernel declarations. */
off_t dumplo; /* where dump starts on dumpdev */
int dumpmag; /* magic number in dump */
int dumpsize; /* amount of memory dumped */
off_t dumpsize; /* amount of memory dumped */
char *kernel; /* user-specified kernel */
char *savedir; /* directory to save dumps in */
@ -579,10 +579,12 @@ get_crashtime()
void
get_dumpsize()
{
unsigned int dumppages;
/* Read the dump size. */
DumpRead(dumpfd, &dumpsize, sizeof(dumpsize),
DumpRead(dumpfd, &dumppages, sizeof(dumppages),
(off_t)(dumplo + ok(dump_nl[X_DUMPSIZE].n_value)), L_SET);
dumpsize *= getpagesize();
dumpsize = dumppages * getpagesize();
}
/*