mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 23:03:27 +08:00
If there are no streams, let printf() fall back to use syslog() for output.
This commit is contained in:
@@ -58,13 +58,8 @@ int printf(FAR const IPTR char *fmt, ...)
|
|||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
#if CONFIG_NFILE_STREAMS > 0
|
#if CONFIG_NFILE_STREAMS > 0
|
||||||
ret = vfprintf(stdout, fmt, ap);
|
ret = vfprintf(stdout, fmt, ap);
|
||||||
#elif CONFIG_NFILE_DESCRIPTORS > 0
|
|
||||||
ret = vsyslog(LOG_INFO, fmt, ap);
|
|
||||||
#else
|
#else
|
||||||
# ifdef CONFIG_CPP_HAVE_WARNING
|
ret = vsyslog(LOG_INFO, fmt, ap);
|
||||||
# warning "printf has no data sink"
|
|
||||||
# endif
|
|
||||||
ret = 0;
|
|
||||||
#endif
|
#endif
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user