diff options
author | 2001-01-20 18:24:55 +0000 | |
---|---|---|
committer | 2001-01-20 18:24:55 +0000 | |
commit | 253c413499e610bb9be68cecf888c25130a0ad15 (patch) | |
tree | f9c434b964620ccd9ea645b57879a7de3b54dad9 | |
parent | dh_new_group() does not return NULL. ok markus@ (diff) | |
download | wireguard-openbsd-253c413499e610bb9be68cecf888c25130a0ad15.tar.xz wireguard-openbsd-253c413499e610bb9be68cecf888c25130a0ad15.zip |
if using serial console, do not apply graphics rows/cols to tty settings; joost@c-lab.de
-rw-r--r-- | sys/arch/sparc/dev/cons.c | 64 |
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; } |