diff options
author | Andrew Tridgell <tridge@samba.org> | 2013-01-19 12:58:02 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2013-01-21 07:41:56 +1100 |
commit | 724252768c6978d7f776895811a3e30cb3e77368 (patch) | |
tree | ebd1293f218823239dda4abab04774eccfa14c46 /nuttx/libc/stdio/lib_rawprintf.c | |
parent | 48e497e4069a2f8773d90f2d1887967a81e487d8 (diff) | |
download | px4-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.c | 15 |
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); +} |