diff options
author | peter <peter@FreeBSD.org> | 2001-06-08 03:06:24 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2001-06-08 03:06:24 +0000 |
commit | 7e86848fd5e19acf3a423b2c7ecbd85cdec5add0 (patch) | |
tree | 18a23f43e712000f8be4962fa2f77433592813f6 /sbin/savecore/savecore.c | |
parent | cdcf339b5c41e9bcb3b776a71b49f410f9fec9d5 (diff) | |
download | FreeBSD-src-7e86848fd5e19acf3a423b2c7ecbd85cdec5add0.zip FreeBSD-src-7e86848fd5e19acf3a423b2c7ecbd85cdec5add0.tar.gz |
'int dumpsize; /* memory size in bytes */' is not good for machines
with 2GB or more of ram.
Diffstat (limited to 'sbin/savecore/savecore.c')
-rw-r--r-- | sbin/savecore/savecore.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sbin/savecore/savecore.c b/sbin/savecore/savecore.c index 846f921..1de4fde 100644 --- a/sbin/savecore/savecore.c +++ b/sbin/savecore/savecore.c @@ -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(); } /* |