diff options
author | des <des@FreeBSD.org> | 2002-03-11 11:23:48 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2002-03-11 11:23:48 +0000 |
commit | a19391e8bd85d3c012b3a80017af2c5e83dd18b8 (patch) | |
tree | 40db98b6717d74bc635fee30030786715d277dbc | |
parent | c217051c4ec068315027ccdb10386eba6deabe43 (diff) | |
download | FreeBSD-src-a19391e8bd85d3c012b3a80017af2c5e83dd18b8.zip FreeBSD-src-a19391e8bd85d3c012b3a80017af2c5e83dd18b8.tar.gz |
Sparc64 support.
-rw-r--r-- | sbin/savecore/savecore.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sbin/savecore/savecore.c b/sbin/savecore/savecore.c index 4fcc5ea..cfa9c6a 100644 --- a/sbin/savecore/savecore.c +++ b/sbin/savecore/savecore.c @@ -66,12 +66,12 @@ static const char rcsid[] = extern FILE *zopen(const char *fname, const char *mode); -#ifdef __alpha__ -#define ok(number) ALPHA_K0SEG_TO_PHYS(number) -#endif - -#ifdef __i386__ +#if defined(__i386__) || defined(__sparc64__) #define ok(number) ((number) - kernbase) +#elif defined(__alpha__) +#define ok(number) ALPHA_K0SEG_TO_PHYS(number) +#else +#error savecore has not been ported to this platform yet. #endif struct nlist current_nl[] = { /* Namelist for currently running system. */ @@ -122,7 +122,7 @@ char panic_mesg[1024]; /* panic message */ int panicstr; /* flag: dump was caused by panic */ char vers[1024]; /* version of kernel that crashed */ -#ifdef __i386__ +#if defined(__i386__) || defined(__sparc64__) u_long kernbase; /* offset of kvm to core file */ #endif @@ -258,7 +258,7 @@ kmem_setup() exit(1); } -#ifdef __i386__ +#if defined(__i386__) || defined(__sparc64__) if (dump_nl[X_KERNBASE].n_value != 0) kernbase = dump_nl[X_KERNBASE].n_value; else |