| 620 | } |
| 621 | |
| 622 | int |
| 623 | sbuf_vprintf(struct sbuf *s, const char *fmt, va_list ap) |
| 624 | { |
| 625 | |
| 626 | assert_sbuf_integrity(s); |
| 627 | assert_sbuf_state(s, 0); |
| 628 | |
| 629 | KASSERT(fmt != NULL, |
| 630 | ("%s called with a NULL format string", __func__)); |
| 631 | |
| 632 | (void)kvprintf(fmt, sbuf_putc_func, s, 10, ap); |
| 633 | if (s->s_error != 0) |
| 634 | return (-1); |
| 635 | return (0); |
| 636 | } |
| 637 | #else /* !_KERNEL */ |
| 638 | int |
| 639 | sbuf_vprintf(struct sbuf *s, const char *fmt, va_list ap) |
no test coverage detected