aboutsummaryrefslogtreecommitdiff
path: root/nuttx/libc/stdio/lib_rawprintf.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2013-01-19 12:58:02 +1100
committerAndrew Tridgell <tridge@samba.org>2013-01-21 07:41:56 +1100
commit724252768c6978d7f776895811a3e30cb3e77368 (patch)
treeebd1293f218823239dda4abab04774eccfa14c46 /nuttx/libc/stdio/lib_rawprintf.c
parent48e497e4069a2f8773d90f2d1887967a81e487d8 (diff)
downloadpx4-firmware-724252768c6978d7f776895811a3e30cb3e77368.tar.gz
px4-firmware-724252768c6978d7f776895811a3e30cb3e77368.tar.bz2
px4-firmware-724252768c6978d7f776895811a3e30cb3e77368.zip
stdio: added vdprintf() for printf to a file descriptor
Diffstat (limited to 'nuttx/libc/stdio/lib_rawprintf.c')
-rw-r--r--nuttx/libc/stdio/lib_rawprintf.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/nuttx/libc/stdio/lib_rawprintf.c b/nuttx/libc/stdio/lib_rawprintf.c
index 98bbbea05..ddbb84f94 100644
--- a/nuttx/libc/stdio/lib_rawprintf.c
+++ b/nuttx/libc/stdio/lib_rawprintf.c
@@ -149,3 +149,18 @@ int lib_rawprintf(const char *fmt, ...)
return ret;
}
+
+
+/****************************************************************************
+ * Name: lib_rawvdprintf
+ ****************************************************************************/
+
+int lib_rawvdprintf(int fd, const char *fmt, va_list ap)
+{
+ /* Wrap the fd in a stream object and let lib_vsprintf
+ * do the work.
+ */
+ struct lib_rawoutstream_s rawoutstream;
+ lib_rawoutstream(&rawoutstream, fd);
+ return lib_vsprintf(&rawoutstream.public, fmt, ap);
+}