From db378762cd6a19d54201f27d459f03db62fda166 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Sat, 20 Jan 2001 18:24:56 +0000 Subject: if using serial console, do not apply graphics rows/cols to tty settings; joost@c-lab.de --- sys/arch/sparc/dev/cons.c | 64 ++++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 31 deletions(-) (limited to 'sys/arch/sparc/dev/cons.c') 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; } -- cgit v1.2.3