aboutsummaryrefslogtreecommitdiff
path: root/sys/isa/syscons_isa.c
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2000-06-15 10:01:12 +0000
committerPeter Wemm <peter@FreeBSD.org>2000-06-15 10:01:12 +0000
commit81e3fd99fc5921937300f1888f133e1ea3f8ce02 (patch)
tree58f81475be38f1234be4b91ae139787710de9481 /sys/isa/syscons_isa.c
parent59bb1d9c7bb2c6349fcff599c48d06b12b632ac4 (diff)
downloadsrc-81e3fd99fc5921937300f1888f133e1ea3f8ce02.tar.gz
src-81e3fd99fc5921937300f1888f133e1ea3f8ce02.zip
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.
Notes
Notes: svn path=/head/; revision=61704
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 a4672f0d9aea..e65e984b9586 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);