Add internal wrapper for vdprintf(3) that is only available on Unix.
Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
if (cl->s_out < 0)
return;
va_start(ap, fmt);
- vdprintf(cl->s_out, fmt, ap);
+ cmdline_vdprintf(cl->s_out, fmt, ap);
va_end(ap);
}
{
return read(cl->s_in, c, 1);
}
+
+int
+cmdline_vdprintf(int fd, const char *format, va_list op)
+{
+ return vdprintf(fd, format, op);
+}
#ifndef _CMDLINE_PRIVATE_H_
#define _CMDLINE_PRIVATE_H_
+#include <stdarg.h>
+
+#include <rte_common.h>
+
#include <cmdline.h>
/* Disable buffering and echoing, save previous settings to oldterm. */
/* Read one character from input. */
ssize_t cmdline_read_char(struct cmdline *cl, char *c);
+/* vdprintf(3) */
+__rte_format_printf(2, 0)
+int cmdline_vdprintf(int fd, const char *format, va_list op);
+
#endif