From c97e08fb9426839ce61bdba2e365f51a9c3deccb Mon Sep 17 00:00:00 2001 From: Andrew Gallatin Date: Thu, 13 Sep 2001 21:19:13 +0000 Subject: [PATCH] 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 --- sbin/savecore/savecore.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/savecore/savecore.c b/sbin/savecore/savecore.c index 966d18a2d227..5c6bdb58a3e2 100644 --- a/sbin/savecore/savecore.c +++ b/sbin/savecore/savecore.c @@ -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);