aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2001-06-08 03:14:05 +0000
committerPeter Wemm <peter@FreeBSD.org>2001-06-08 03:14:05 +0000
commit5fc8aceac590becbc4532c3052c4d04fca2ac507 (patch)
tree726428a9077a00d4abf19f63977d4b1c730e6790
parent4479ee219f38880beac33968b042930e5c176a48 (diff)
downloadsrc-5fc8aceac590becbc4532c3052c4d04fca2ac507.tar.gz
src-5fc8aceac590becbc4532c3052c4d04fca2ac507.zip
MFC: rev 1.40: trivial fix for savecore on 2GB+ ram machines
Notes
Notes: svn path=/stable/3/; revision=77895
-rw-r--r--sbin/savecore/savecore.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sbin/savecore/savecore.c b/sbin/savecore/savecore.c
index 33b6fc31d4c7..9d17d090d435 100644
--- a/sbin/savecore/savecore.c
+++ b/sbin/savecore/savecore.c
@@ -101,7 +101,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;
char *dirname; /* directory to save dumps in */
@@ -536,10 +536,12 @@ get_crashtime()
void
get_dumpsize()
{
+ unsigned int dumppages;
+
/* Read the dump size. */
Lseek(dumpfd, (off_t)(dumplo + ok(dump_nl[X_DUMPSIZE].n_value)), L_SET);
- (void)Read(dumpfd, &dumpsize, sizeof(dumpsize));
- dumpsize *= getpagesize();
+ (void)Read(dumpfd, &dumppages, sizeof(dumppages));
+ dumpsize = dumppages * getpagesize();
}
int