If there are no streams, let printf() fall back to use syslog() for output.

This commit is contained in:
Gregory Nutt 2016-07-11 13:52:21 -06:00
parent 29eae10232
commit f9d4b50207

View File

@ -58,13 +58,8 @@ int printf(FAR const IPTR char *fmt, ...)
va_start(ap, fmt);
#if CONFIG_NFILE_STREAMS > 0
ret = vfprintf(stdout, fmt, ap);
#elif CONFIG_NFILE_DESCRIPTORS > 0
ret = vsyslog(LOG_INFO, fmt, ap);
#else
# ifdef CONFIG_CPP_HAVE_WARNING
# warning "printf has no data sink"
# endif
ret = 0;
ret = vsyslog(LOG_INFO, fmt, ap);
#endif
va_end(ap);