mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-14 14:55:41 +00:00
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.
This commit is contained in:
parent
59bb1d9c7b
commit
81e3fd99fc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=61704
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user