diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1997-11-11 12:49:22 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1997-11-11 12:49:22 +0000 |
commit | e0529f1c346e7d30c721ab99c3459e46dea867ee (patch) | |
tree | f154279ae72a66133e582d21a041ac92fb2ffed2 /sys | |
parent | 4827e5dee0d2615ed713c17620e24c1b6a572b7a (diff) |
whoops typo in last commit + accept 0 in col/row values on sun4 mean full sz
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/sparc/dev/fb.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/sys/arch/sparc/dev/fb.c b/sys/arch/sparc/dev/fb.c index af91565c673..5bfe3cf5ced 100644 --- a/sys/arch/sparc/dev/fb.c +++ b/sys/arch/sparc/dev/fb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fb.c,v 1.11 1997/11/11 11:49:12 niklas Exp $ */ +/* $OpenBSD: fb.c,v 1.12 1997/11/11 12:49:21 niklas Exp $ */ /* $NetBSD: fb.c,v 1.23 1997/07/07 23:30:22 pk Exp $ */ /* @@ -412,20 +412,18 @@ fbrcons_init(fb) if (CPU_ISSUN4) { struct eeprom *eep = (struct eeprom *)eeprom_va; - if (eep == NULL) { - rc->rc_maxcol = max(rc->rc_maxcol, 80); - rc->rc_maxrow = max(rc->rc_maxrow, 34); - } else { - rc->rc_maxcol = max(rc->rc_maxcol, eep->eeTtyCols); - rc->rc_maxrow = max(rc->rc_maxrow, eep->eeTtyRows); + rc->rc_maxcol = min(rc->rc_maxcol, + (eep && eep->eeTtyCols) ? eep->eeTtyCols : 80); + rc->rc_maxcol = min(rc->rc_maxcol, + (eep && eep->eeTtyRows) ? eep->eeTtyRows : 34); } } #endif /* SUN4 */ if (!CPU_ISSUN4) { - rc->rc_maxcol = max(rc->rc_maxcol, + rc->rc_maxcol = min(rc->rc_maxcol, a2int(getpropstring(optionsnode, "screen-#columns"), 80)); - rc->rc_maxrow = max(rc->rc_maxrow, + rc->rc_maxrow = min(rc->rc_maxrow, a2int(getpropstring(optionsnode, "screen-#rows"), 34)); } #endif /* !RASTERCONS_FULLSCREEN && !RASTERCONS_SMALLFONT */ |