mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
Reformat last change
Requested by: nate@
This commit is contained in:
parent
a1d5f791fa
commit
4706b50a40
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=107957
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user