summaryrefslogtreecommitdiffstats
path: root/sys/kern/tty_cons.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/tty_cons.c')
-rw-r--r--sys/kern/tty_cons.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/tty_cons.c b/sys/kern/tty_cons.c
index a40db4b..478c7e9 100644
--- a/sys/kern/tty_cons.c
+++ b/sys/kern/tty_cons.c
@@ -99,6 +99,7 @@ static d_open_t *cn_phys_open; /* physical device open function */
struct consdev *cn_tab; /* physical console device info */
CONS_DRIVER(cons, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+SET_DECLARE(cons_set, struct consdev);
void
cninit()
@@ -109,8 +110,8 @@ cninit()
* Find the first console with the highest priority.
*/
best_cp = NULL;
- list = (struct consdev **)cons_set.ls_items;
- while ((cp = *list++) != NULL) {
+ SET_FOREACH(list, cons_set) {
+ cp = *list;
if (cp->cn_probe == NULL)
continue;
(*cp->cn_probe)(cp);
OpenPOWER on IntegriCloud