Merged from sys/isa/syscons_isa.c revision 1.13.
This commit is contained in:
parent
869f0b9b22
commit
2d43b347ec
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=61742
@ -148,15 +148,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) {
|
||||
@ -171,7 +172,7 @@ sc_get_cons_priority(int *unit, int *flags)
|
||||
*flags = f;
|
||||
}
|
||||
}
|
||||
if ((i < 0) && (*unit < 0))
|
||||
if (*unit < 0)
|
||||
return CN_DEAD;
|
||||
return CN_INTERNAL;
|
||||
}
|
||||
|
@ -148,15 +148,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) {
|
||||
@ -171,7 +172,7 @@ sc_get_cons_priority(int *unit, int *flags)
|
||||
*flags = f;
|
||||
}
|
||||
}
|
||||
if ((i < 0) && (*unit < 0))
|
||||
if (*unit < 0)
|
||||
return CN_DEAD;
|
||||
return CN_INTERNAL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user