diff options
Diffstat (limited to 'nuttx/lib/stdio')
-rw-r--r-- | nuttx/lib/stdio/lib_lowprintf.c | 13 | ||||
-rw-r--r-- | nuttx/lib/stdio/lib_rawprintf.c | 13 |
2 files changed, 20 insertions, 6 deletions
diff --git a/nuttx/lib/stdio/lib_lowprintf.c b/nuttx/lib/stdio/lib_lowprintf.c index e27a5021b..50a6568fb 100644 --- a/nuttx/lib/stdio/lib_lowprintf.c +++ b/nuttx/lib/stdio/lib_lowprintf.c @@ -111,9 +111,16 @@ int lib_lowprintf(const char *fmt, ...) va_list ap; int ret; - va_start(ap, fmt); - ret= lib_lowvprintf(fmt, ap); - va_end(ap); +#ifdef CONFIG_DEBUG_ENABLE + ret = 0; + if (g_dbgenable) +#endif + { + va_start(ap, fmt); + ret = lib_lowvprintf(fmt, ap); + va_end(ap); + } + return ret; } diff --git a/nuttx/lib/stdio/lib_rawprintf.c b/nuttx/lib/stdio/lib_rawprintf.c index a28e6b695..19dfa895e 100644 --- a/nuttx/lib/stdio/lib_rawprintf.c +++ b/nuttx/lib/stdio/lib_rawprintf.c @@ -137,8 +137,15 @@ int lib_rawprintf(const char *fmt, ...) va_list ap; int ret; - va_start(ap, fmt); - ret= lib_rawvprintf(fmt, ap); - va_end(ap); +#ifdef CONFIG_DEBUG_ENABLE + ret = 0; + if (g_dbgenable) +#endif + { + va_start(ap, fmt); + ret = lib_rawvprintf(fmt, ap); + va_end(ap); + } + return ret; } |