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

Function putchar

freebsd/kern/subr_prf.c:489–508  ·  view source on GitHub ↗

* Print a character on console or users terminal. If destination is * the console then the last bunch of characters are saved in msgbuf for * inspection later. */

Source from the content-addressed store, hash-verified

487 * inspection later.
488 */
489static void
490putchar(int c, void *arg)
491{
492 struct putchar_arg *ap = (struct putchar_arg*) arg;
493 struct tty *tp = ap->tty;
494 int flags = ap->flags;
495
496 /* Don't use the tty code after a panic or while in ddb. */
497 if (kdb_active) {
498 if (c != '\0')
499 cnputc(c);
500 return;
501 }
502
503 if ((flags & TOTTY) && tp != NULL && !KERNEL_PANICKED())
504 tty_putchar(tp, c);
505
506 if ((flags & (TOCONS | TOLOG)) && c != '\0')
507 putbuf(c, ap);
508}
509
510/*
511 * Scaled down version of sprintf(3).

Callers 15

parseFunction · 0.85
sysctl_allFunction · 0.85
ifconfig.cFile · 0.85
printbFunction · 0.85
regdomain_addchansFunction · 0.85
list_capabilitiesFunction · 0.85
gif_statusFunction · 0.85
in_statusFunction · 0.85
ifgre.cFile · 0.85
media_statusFunction · 0.85
print_media_wordFunction · 0.85
list_clonersFunction · 0.85

Calls 3

cnputcFunction · 0.85
tty_putcharFunction · 0.85
putbufFunction · 0.70

Tested by 1

mainFunction · 0.68