Lines Matching full:cn
156 struct consdev *best_cn, *cn, **list; in cninit() local
183 cn = *list; in cninit()
184 cnremove(cn); in cninit()
186 if (cn->cn_ops == NULL) in cninit()
188 cn->cn_ops->cn_probe(cn); in cninit()
189 if (cn->cn_pri == CN_DEAD) in cninit()
191 if (best_cn == NULL || cn->cn_pri > best_cn->cn_pri) in cninit()
192 best_cn = cn; in cninit()
197 cn->cn_ops->cn_init(cn); in cninit()
198 cnadd(cn); in cninit()
231 cnadd(struct consdev *cn) in cnadd() argument
237 if (cnd->cnd_cn == cn) in cnadd()
246 cnd->cnd_cn = cn; in cnadd()
247 if (cn->cn_name[0] == '\0') { in cnadd()
249 printf("WARNING: console at %p has no name\n", cn); in cnadd()
256 cnavailable(cn, (cn->cn_flags & CN_FLAG_NOAVAIL) == 0); in cnadd()
262 cnremove(struct consdev *cn) in cnremove() argument
268 if (cnd->cnd_cn != cn) in cnremove()
287 if (cn->cn_term != NULL) in cnremove()
288 cn->cn_ops->cn_term(cn); in cnremove()
295 cnselect(struct consdev *cn) in cnselect() argument
300 if (cnd->cnd_cn != cn) in cnselect()
312 cnavailable(struct consdev *cn, int available) in cnavailable() argument
317 if (cn_devtab[i].cnd_cn == cn) in cnavailable()
323 cn->cn_flags &= ~CN_FLAG_NOAVAIL; in cnavailable()
327 cn->cn_flags |= CN_FLAG_NOAVAIL; in cnavailable()
402 struct consdev *cn; in cngrab() local
405 cn = cnd->cnd_cn; in cngrab()
406 if (!kdb_active || !(cn->cn_flags & CN_FLAG_NODEBUG)) in cngrab()
407 cn->cn_ops->cn_grab(cn); in cngrab()
415 struct consdev *cn; in cnungrab() local
418 cn = cnd->cnd_cn; in cnungrab()
419 if (!kdb_active || !(cn->cn_flags & CN_FLAG_NODEBUG)) in cnungrab()
420 cn->cn_ops->cn_ungrab(cn); in cnungrab()
428 struct consdev *cn; in cnresume() local
431 cn = cnd->cnd_cn; in cnresume()
432 if (cn->cn_ops->cn_resume != NULL) in cnresume()
433 cn->cn_ops->cn_resume(cn); in cnresume()
458 struct consdev *cn; in cncheckc() local
464 cn = cnd->cnd_cn; in cncheckc()
465 if (!kdb_active || !(cn->cn_flags & CN_FLAG_NODEBUG)) { in cncheckc()
466 c = cn->cn_ops->cn_getc(cn); in cncheckc()
525 struct consdev *cn; in cnputc() local
541 cn = cnd->cnd_cn; in cnputc()
542 if (!kdb_active || !(cn->cn_flags & CN_FLAG_NODEBUG)) { in cnputc()
544 cn->cn_ops->cn_putc(cn, '\r'); in cnputc()
545 cn->cn_ops->cn_putc(cn, c); in cnputc()