summaryrefslogtreecommitdiff
path: root/sys/arch/sgi
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2007-12-14 10:13:18 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2007-12-14 10:13:18 +0000
commit641569fe6d53f89f530f3670a65fd72b550ed10e (patch)
tree1329e9c82644db128ca8f1e31538e21055d0a121 /sys/arch/sgi
parent8838180877708559eb17bd3332125832c0f0d6a7 (diff)
Store the ARCBIOS ConsoleOut environment variable so that we can refer to
it later on. ok miod@
Diffstat (limited to 'sys/arch/sgi')
-rw-r--r--sys/arch/sgi/sgi/machdep.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/arch/sgi/sgi/machdep.c b/sys/arch/sgi/sgi/machdep.c
index 1248fe360d4..f0ffd8c09ac 100644
--- a/sys/arch/sgi/sgi/machdep.c
+++ b/sys/arch/sgi/sgi/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.50 2007/12/07 13:07:44 jsing Exp $ */
+/* $OpenBSD: machdep.c,v 1.51 2007/12/14 10:13:17 jsing Exp $ */
/*
* Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -345,6 +345,13 @@ bios_printf("SR=%08x\n", getsr()); /* leave this in for now. need to see sr */
}
/*
+ * Read and store console type.
+ */
+ cp = Bios_GetEnvironmentVariable("ConsoleOut");
+ if (cp != NULL && *cp != '\0')
+ strlcpy(bios_console, cp, sizeof bios_console);
+
+ /*
* Look at arguments passed to us and compute boothowto.
* Default to AUTOBOOT if no args or SINGLE and DFLTROOT
* if this is a ramdisk kernel.
@@ -696,8 +703,7 @@ dobootopts(int argc, void *argv)
}
/* Catch serial consoles on O2s. */
- cp = Bios_GetEnvironmentVariable("ConsoleOut");
- if (cp != NULL && strncmp(cp, "serial", 6) == 0)
+ if (strncmp(bios_console, "serial", 6) == 0)
boothowto |= RB_SERCONS;
}