diff options
author | julian <julian@FreeBSD.org> | 2002-12-16 23:25:12 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2002-12-16 23:25:12 +0000 |
commit | b0781634bbe9874617c0dd6600a1cd614b11135a (patch) | |
tree | 9386166eb0dab117776800ec70d74c7fb96abd99 /sys/amd64 | |
parent | 3cf4280261e4479a41062ad7f2038dafb3594041 (diff) | |
download | FreeBSD-src-b0781634bbe9874617c0dd6600a1cd614b11135a.zip FreeBSD-src-b0781634bbe9874617c0dd6600a1cd614b11135a.tar.gz |
Reformat last change
Requested by: nate@
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/amd64/dump_machdep.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/amd64/amd64/dump_machdep.c b/sys/amd64/amd64/dump_machdep.c index 7d1e06f..3f3acc7 100644 --- a/sys/amd64/amd64/dump_machdep.c +++ b/sys/amd64/amd64/dump_machdep.c @@ -75,12 +75,14 @@ dumpsys(struct dumperinfo *di) strncpy(kdh.panicstring, panicstr, sizeof kdh.panicstring); kdh.parity = kerneldump_parity(&kdh); + /* + * Check if we will have enough room to save the coredump. + * The partition size needed is the sum of: + * Memory to save + header + trailer + Room to leave untouched + * at partition head. (an arbitrary amount). + */ if (di->mediasize < - ((Maxmem * (off_t)PAGE_SIZE) + /* Memory to save */ - (sizeof kdh * 2) + /* header + trailer */ - (64*1024))) { /* Room to leave untouched */ - /* at partition head. */ - /* (an arbitrary amount). */ + Maxmem * (off_t)PAGE_SIZE + sizeof kdh * 2 + 64*1024) { printf("\nDump failed. Partition too small.\n"); return; } |