diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2007-12-28 20:44:40 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2007-12-28 20:44:40 +0000 |
commit | fef433a4508472ed9b47dc068e76fb5cc743bd93 (patch) | |
tree | b1cbd5f2f12fee61e955fcfd027399338d406187 /sys/arch/vax/vsa/lcg.c | |
parent | 68153d70629847b689dff52e9ddc737ad5a39d60 (diff) |
If initializing a frame buffer as glass console fails, instead of an invisible
panic (for you ichc fans out there), disable the wscons console and force a
console device reselection, which ends up in picking a serial console.
This should not happen, but just in case, it's a less rude behaviour.
Diffstat (limited to 'sys/arch/vax/vsa/lcg.c')
-rw-r--r-- | sys/arch/vax/vsa/lcg.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/arch/vax/vsa/lcg.c b/sys/arch/vax/vsa/lcg.c index 416ab9265ca..c52a601b8a9 100644 --- a/sys/arch/vax/vsa/lcg.c +++ b/sys/arch/vax/vsa/lcg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lcg.c,v 1.12 2007/12/18 19:39:27 miod Exp $ */ +/* $OpenBSD: lcg.c,v 1.13 2007/12/28 20:44:39 miod Exp $ */ /* * Copyright (c) 2006 Miodrag Vallat. * @@ -706,7 +706,7 @@ lcg_resetcmap(struct lcg_screen *ss) */ int lcgcnprobe(void); -void lcgcninit(void); +int lcgcninit(void); int lcgcnprobe() @@ -764,7 +764,7 @@ lcgcnprobe() * Because it's called before the VM system is initialized, virtual memory * for the framebuffer can be stolen directly without disturbing anything. */ -void +int lcgcninit() { struct lcg_screen *ss = &lcg_consscr; @@ -798,11 +798,13 @@ lcgcninit() virtual_avail = round_page(virtual_avail); - /* this had better not fail as we can't recover there */ + /* this had better not fail */ if (lcg_setup_screen(ss) != 0) - panic(__func__); + return (1); ri = &ss->ss_ri; ri->ri_ops.alloc_attr(ri, 0, 0, 0, &defattr); wsdisplay_cnattach(&lcg_stdscreen, ri, 0, 0, defattr); + + return (0); } |