MCPcopy Create free account
hub / github.com/F-Stack/f-stack / termcn_cnregister

Function termcn_cnregister

freebsd/kern/subr_terminal.c:527–549  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

525};
526
527void
528termcn_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
551static void
552termcn_cngrab(struct consdev *cp)

Callers

nothing calls this directly

Calls 4

mallocFunction · 0.85
sprintfFunction · 0.85
terminal_initFunction · 0.85
cnaddFunction · 0.85

Tested by

no test coverage detected