Remove new console devices with cnremove before initializing them in

cninit.  This allows a console driver to replace the existing console
by calling cninit again, eg during the device probe.  Otherwise the
multiple console code sends output to both, which is unfortunate if
they're using the same hardware.
This commit is contained in:
Jake Burkholder 2002-08-06 18:56:41 +00:00
parent ae9e184e5e
commit a520b73cdc

View File

@ -148,6 +148,7 @@ cninit(void)
best_cn = NULL; best_cn = NULL;
SET_FOREACH(list, cons_set) { SET_FOREACH(list, cons_set) {
cn = *list; cn = *list;
cnremove(cn);
if (cn->cn_probe == NULL) if (cn->cn_probe == NULL)
continue; continue;
cn->cn_probe(cn); cn->cn_probe(cn);