summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjake <jake@FreeBSD.org>2002-08-06 18:56:41 +0000
committerjake <jake@FreeBSD.org>2002-08-06 18:56:41 +0000
commitea746a5dab02c45c3d3b91c05437f1e9c51a13ac (patch)
tree6e19d98dae805a84d0aa1b871ec5e047c4e8bb71
parented392d3011655983c4535560b4b01e50092131d5 (diff)
downloadFreeBSD-src-ea746a5dab02c45c3d3b91c05437f1e9c51a13ac.zip
FreeBSD-src-ea746a5dab02c45c3d3b91c05437f1e9c51a13ac.tar.gz
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.
-rw-r--r--sys/kern/tty_cons.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/tty_cons.c b/sys/kern/tty_cons.c
index 91713c1..40285fc 100644
--- a/sys/kern/tty_cons.c
+++ b/sys/kern/tty_cons.c
@@ -148,6 +148,7 @@ cninit(void)
best_cn = NULL;
SET_FOREACH(list, cons_set) {
cn = *list;
+ cnremove(cn);
if (cn->cn_probe == NULL)
continue;
cn->cn_probe(cn);
OpenPOWER on IntegriCloud