Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sun3 Use the string kernel_arch to determine "sun3"...



details:   https://anonhg.NetBSD.org/src/rev/ae7f2890ac9a
branches:  trunk
changeset: 471688:ae7f2890ac9a
user:      gwr <gwr%NetBSD.org@localhost>
date:      Thu Apr 08 04:17:43 1999 +0000

description:
Use the string kernel_arch to determine "sun3" vs "sun3x"
and leave the machine string as it was (make uses it).

diffstat:

 sys/arch/sun3/sun3/machdep.c  |  10 ++++++----
 sys/arch/sun3/sun3x/machdep.c |  12 ++++++------
 2 files changed, 12 insertions(+), 10 deletions(-)

diffs (78 lines):

diff -r aa8dc2209356 -r ae7f2890ac9a sys/arch/sun3/sun3/machdep.c
--- a/sys/arch/sun3/sun3/machdep.c      Thu Apr 08 04:08:01 1999 +0000
+++ b/sys/arch/sun3/sun3/machdep.c      Thu Apr 08 04:17:43 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.125 1999/04/01 00:17:49 thorpej Exp $    */
+/*     $NetBSD: machdep.c,v 1.126 1999/04/08 04:17:43 gwr Exp $        */
 
 /*
  * Copyright (c) 1994, 1995 Gordon W. Ross
@@ -469,7 +469,8 @@
 /*
  * Info for CTL_HW
  */
-char   machine[16] = MACHINE;  /* from <machine/param.h> */
+char   machine[16] = MACHINE;          /* from <machine/param.h> */
+char   kernel_arch[16] = "sun3";       /* XXX needs a sysctl node */
 char   cpu_model[120];
 
 /*
@@ -485,7 +486,8 @@
        extern char *cpu_string;        /* XXX */
 
        /* Other stuff? (VAC, mc6888x version, etc.) */
-       sprintf(cpu_model, "Sun-3 (3/%s)", cpu_string);
+       /* Note: miniroot cares about the kernel_arch part. */
+       sprintf(cpu_model, "%s %s", kernel_arch, cpu_string);
 
        printf("Model: %s\n", cpu_model);
 }
@@ -763,7 +765,7 @@
        kseg_p->c_size = (ctob(DUMP_EXTRA) - sizeof(*kseg_p));
 
        /* Fill in cpu_kcore_hdr_t part. */
-       strncpy(chdr_p->name, "sun3", sizeof(chdr_p->name));
+       strncpy(chdr_p->name, kernel_arch, sizeof(chdr_p->name));
        chdr_p->page_size = NBPG;
        chdr_p->kernbase = KERNBASE;
 
diff -r aa8dc2209356 -r ae7f2890ac9a sys/arch/sun3/sun3x/machdep.c
--- a/sys/arch/sun3/sun3x/machdep.c     Thu Apr 08 04:08:01 1999 +0000
+++ b/sys/arch/sun3/sun3x/machdep.c     Thu Apr 08 04:17:43 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.45 1999/04/01 00:17:50 thorpej Exp $     */
+/*     $NetBSD: machdep.c,v 1.46 1999/04/08 04:17:44 gwr Exp $ */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -464,9 +464,8 @@
 /*
  * Info for CTL_HW
  */
-
-/* Non-standard name here to distinguish Sun3 from Sun3X. */
-char   machine[16] = "sun3x";  /* Not same as MACHINE! */
+char   machine[16] = MACHINE;          /* from <machine/param.h> */
+char   kernel_arch[16] = "sun3x";      /* XXX needs a sysctl node */
 char   cpu_model[120];
 
 /*
@@ -508,7 +507,8 @@
        }
 
        /* Other stuff? (VAC, mc6888x version, etc.) */
-       sprintf(cpu_model, "Sun-3X (3/%s)", cpu_string);
+       /* Note: miniroot cares about the kernel_arch part. */
+       sprintf(cpu_model, "%s %s", kernel_arch, cpu_string);
 
        printf("Model: %s\n", cpu_model);
 }
@@ -788,7 +788,7 @@
        kseg_p->c_size = sizeof(*chdr_p);
 
        /* Fill in cpu_kcore_hdr_t part. */
-       strncpy(chdr_p->name, "sun3x", sizeof(chdr_p->name));
+       strncpy(chdr_p->name, kernel_arch, sizeof(chdr_p->name));
        chdr_p->page_size = NBPG;
        chdr_p->kernbase = KERNBASE;
 



Home | Main Index | Thread Index | Old Index