| 525 | }; |
| 526 | |
| 527 | void |
| 528 | termcn_cnregister(struct terminal *tm) |
| 529 | { |
| 530 | struct consdev *cp; |
| 531 | |
| 532 | cp = tm->consdev; |
| 533 | if (cp == NULL) { |
| 534 | cp = malloc(sizeof(struct consdev), M_TERMINAL, |
| 535 | M_WAITOK|M_ZERO); |
| 536 | cp->cn_ops = &termcn_cnops; |
| 537 | cp->cn_arg = tm; |
| 538 | cp->cn_pri = CN_INTERNAL; |
| 539 | sprintf(cp->cn_name, "ttyv0"); |
| 540 | |
| 541 | tm->tm_flags = TF_CONS; |
| 542 | tm->consdev = cp; |
| 543 | |
| 544 | terminal_init(tm); |
| 545 | } |
| 546 | |
| 547 | /* Attach terminal as console. */ |
| 548 | cnadd(cp); |
| 549 | } |
| 550 | |
| 551 | static void |
| 552 | termcn_cngrab(struct consdev *cp) |
nothing calls this directly
no test coverage detected