summaryrefslogtreecommitdiffstats
path: root/sys/isa/syscons_isa.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2000-06-15 10:01:12 +0000
committerpeter <peter@FreeBSD.org>2000-06-15 10:01:12 +0000
commit60767a238430f30fde921d33ffe70aa27c7b37b5 (patch)
treef136890a5d23e1f59a318c6ccee6ee57c7af3afd /sys/isa/syscons_isa.c
parentcc59a2825d1f5b1cb47dd960ba1668dc3ae670fd (diff)
downloadFreeBSD-src-60767a238430f30fde921d33ffe70aa27c7b37b5.zip
FreeBSD-src-60767a238430f30fde921d33ffe70aa27c7b37b5.tar.gz
This is a temporary bandaid to get vidconsole working again without
options USERCONFIG being present. Due to the lack of early boot hints neither sio or sc would succeed the console probe. If USERCONFIG was active, there was a second cninit() after userconfig had run and that happened to make the console selection work. If you left out USERCONFIG, you would end up with no console at all. :-( This needs a proper fix, especially when sc looses the "at isa" hint. But for now, this works.
Diffstat (limited to 'sys/isa/syscons_isa.c')
-rw-r--r--sys/isa/syscons_isa.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/isa/syscons_isa.c b/sys/isa/syscons_isa.c
index a4672f0..e65e984 100644
--- a/sys/isa/syscons_isa.c
+++ b/sys/isa/syscons_isa.c
@@ -162,15 +162,16 @@ int
sc_get_cons_priority(int *unit, int *flags)
{
int disabled;
+ char *at;
int u, f;
- int i;
*unit = -1;
- for (i = -1; (i = resource_locate(i, SC_DRIVER_NAME)) >= 0;) {
- u = resource_query_unit(i);
+ for (u = 0; u < 16; u++) {
if ((resource_int_value(SC_DRIVER_NAME, u, "disabled",
&disabled) == 0) && disabled)
continue;
+ if (resource_string_value(SC_DRIVER_NAME, u, "at", &at) != 0)
+ continue;
if (resource_int_value(SC_DRIVER_NAME, u, "flags", &f) != 0)
f = 0;
if (f & SC_KERNEL_CONSOLE) {
@@ -185,7 +186,7 @@ sc_get_cons_priority(int *unit, int *flags)
*flags = f;
}
}
- if ((i < 0) && (*unit < 0))
+ if (*unit < 0)
return CN_DEAD;
#if 0
return ((*flags & SC_KERNEL_CONSOLE) ? CN_INTERNAL : CN_NORMAL);
OpenPOWER on IntegriCloud