| 2423 | } |
| 2424 | |
| 2425 | void io_printf(int fd, const char *format, ...) |
| 2426 | { |
| 2427 | va_list ap; |
| 2428 | char buf[BIGPATHBUFLEN]; |
| 2429 | int len; |
| 2430 | |
| 2431 | va_start(ap, format); |
| 2432 | len = vsnprintf(buf, sizeof buf, format, ap); |
| 2433 | va_end(ap); |
| 2434 | |
| 2435 | if (len < 0) |
| 2436 | exit_cleanup(RERR_PROTOCOL); |
| 2437 | |
| 2438 | if (len >= (int)sizeof buf) { |
| 2439 | rprintf(FERROR, "io_printf() was too long for the buffer.\n"); |
| 2440 | exit_cleanup(RERR_PROTOCOL); |
| 2441 | } |
| 2442 | |
| 2443 | write_sbuf(fd, buf); |
| 2444 | } |
| 2445 | |
| 2446 | /* Setup for multiplexing a MSG_* stream with the data stream. */ |
| 2447 | void io_start_multiplex_out(int fd) |
no test coverage detected