summaryrefslogtreecommitdiff
path: root/sys/arch/sparc/dev/cons.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/sparc/dev/cons.c')
-rw-r--r--sys/arch/sparc/dev/cons.c64
1 files changed, 33 insertions, 31 deletions
diff --git a/sys/arch/sparc/dev/cons.c b/sys/arch/sparc/dev/cons.c
index d14aa8c2fb1..a377e99e45c 100644
--- a/sys/arch/sparc/dev/cons.c
+++ b/sys/arch/sparc/dev/cons.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cons.c,v 1.9 2000/07/06 15:42:48 ho Exp $ */
+/* $OpenBSD: cons.c,v 1.10 2001/01/20 18:24:55 deraadt Exp $ */
/* $NetBSD: cons.c,v 1.30 1997/07/07 23:30:23 pk Exp $ */
/*
@@ -297,41 +297,43 @@ cnopen(dev, flag, mode, p)
/*
* get the console struct winsize.
*/
-#ifdef RASTERCONSOLE
if (fbconstty) {
+#ifdef RASTERCONSOLE
rows = fbrcons_rows();
cols = fbrcons_cols();
- }
-#endif
-
- if (CPU_ISSUN4COR4M) {
- int i;
- char *prop;
-
- if (rows == 0 &&
- (prop = getpropstring(optionsnode, "screen-#rows"))) {
- i = 0;
- while (*prop != '\0')
- i = i * 10 + *prop++ - '0';
- rows = (unsigned short)i;
+#else
+ if (CPU_ISSUN4COR4M) {
+ int i;
+ char *prop;
+
+ if (rows == 0 &&
+ (prop = getpropstring(optionsnode,
+ "screen-#rows"))) {
+ i = 0;
+ while (*prop != '\0')
+ i = i * 10 + *prop++ - '0';
+ rows = (unsigned short)i;
+ }
+ if (cols == 0 &&
+ (prop = getpropstring(optionsnode,
+ "screen-#columns"))) {
+ i = 0;
+ while (*prop != '\0')
+ i = i * 10 + *prop++ - '0';
+ cols = (unsigned short)i;
+ }
}
- if (cols == 0 &&
- (prop = getpropstring(optionsnode, "screen-#columns"))) {
- i = 0;
- while (*prop != '\0')
- i = i * 10 + *prop++ - '0';
- cols = (unsigned short)i;
- }
- }
- if (CPU_ISSUN4) {
- struct eeprom *ep = (struct eeprom *)eeprom_va;
-
- if (ep) {
- if (rows == 0)
- rows = (u_short)ep->eeTtyRows;
- if (cols == 0)
- cols = (u_short)ep->eeTtyCols;
+ if (CPU_ISSUN4) {
+ struct eeprom *ep = (struct eeprom *)eeprom_va;
+
+ if (ep) {
+ if (rows == 0)
+ rows = (u_short)ep->eeTtyRows;
+ if (cols == 0)
+ cols = (u_short)ep->eeTtyCols;
+ }
}
+#endif
}
firstopen = 0;
}