If there are no streams, let printf() fall back to use syslog() for output.
This commit is contained in:
parent
29eae10232
commit
f9d4b50207
@ -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);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user