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

Function vprintf

lib/ff_subr_prf.c:549–581  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

547}
548
549int
550vprintf(const char *fmt, va_list ap)
551{
552 struct putchar_arg pca;
553 int retval;
554
555 pca.tty = NULL;
556 pca.flags = TOCONS | TOLOG;
557 pca.pri = -1;
558#ifdef PRINTF_BUFR_SIZE
559 pca.p_bufr = bufr;
560 pca.p_next = pca.p_bufr;
561 pca.n_bufr = sizeof(bufr);
562 pca.remain = sizeof(bufr);
563 *pca.p_next = '\0';
564#else
565 /* Don't buffer console output. */
566 pca.p_bufr = NULL;
567#endif
568
569 putbuf_done = 0;
570
571 retval = kvprintf(fmt, kputchar, &pca, 10, ap);
572
573#ifdef PRINTF_BUFR_SIZE
574 /* Write any buffered console/log output: */
575 if (*pca.p_bufr != '\0' && putbuf_done == 0) {
576 puts(pca.p_bufr);
577 }
578#endif
579
580 return (retval);
581}
582
583void
584vlog(int level, const char *fmt, va_list ap)

Callers 4

panicFunction · 0.70
printfFunction · 0.70
vlogFunction · 0.70
clusterManagerLogFunction · 0.50

Calls 1

kvprintfFunction · 0.70

Tested by

no test coverage detected