fix savecore so that it works on the alpha after the size change

of dumpmag from an int to a u_long in rev 1.41 -- without this
change, savecore will always fail like this:

#savecore -v /var/crash
dumplo = 874356736 (1707728 * 512)
savecore: magic number mismatch (8fca0101 != 8fca0101)
savecore: no core dump
This commit is contained in:
Andrew Gallatin 2001-09-13 21:19:13 +00:00
parent d528be2bf3
commit c97e08fb94
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=83415

View File

@ -328,7 +328,7 @@ check_kmem()
void
clear_dump()
{
int newdumpmag;
u_long newdumpmag;
newdumpmag = 0;
DumpWrite(dumpfd, &newdumpmag, sizeof(newdumpmag),
@ -343,7 +343,7 @@ clear_dump()
int
dump_exists()
{
int newdumpmag;
u_long newdumpmag;
DumpRead(dumpfd, &newdumpmag, sizeof(newdumpmag),
(off_t)(dumplo + ok(dump_nl[X_DUMPMAG].n_value)), L_SET);