summaryrefslogtreecommitdiff
path: root/sys/arch/sparc/dev/cons.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2001-01-20 18:24:56 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2001-01-20 18:24:56 +0000
commitdb378762cd6a19d54201f27d459f03db62fda166 (patch)
tree1d12eba8fb4363f1ef279e926149a95c8ea478d4 /sys/arch/sparc/dev/cons.c
parent11b8520b755fb2e0709f0e87093062f4a66d27bf (diff)
if using serial console, do not apply graphics rows/cols to tty settings; joost@c-lab.de
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;
}