aboutsummaryrefslogtreecommitdiff
path: root/nuttx/libc/misc/lib_dbg.c
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2013-02-17 09:14:12 -0800
committerLorenz Meier <lm@inf.ethz.ch>2013-02-17 09:14:12 -0800
commit520a2b417410bed7db6f08a3a69f3bcccc55910b (patch)
tree2365774545ed145c307630b63cb5f075fca71c21 /nuttx/libc/misc/lib_dbg.c
parent2745c3276f5c2377a9713555c5941b17912b6ce7 (diff)
parentcaa11f0bbb7f30679c5c01a64e1d0f6d8627db9d (diff)
downloadpx4-firmware-520a2b417410bed7db6f08a3a69f3bcccc55910b.tar.gz
px4-firmware-520a2b417410bed7db6f08a3a69f3bcccc55910b.tar.bz2
px4-firmware-520a2b417410bed7db6f08a3a69f3bcccc55910b.zip
Merge pull request #198 from PX4/nuttx-merge-5596
Nuttx merge 5596
Diffstat (limited to 'nuttx/libc/misc/lib_dbg.c')
-rw-r--r--nuttx/libc/misc/lib_dbg.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/nuttx/libc/misc/lib_dbg.c b/nuttx/libc/misc/lib_dbg.c
index 5605ff828..921a4e24d 100644
--- a/nuttx/libc/misc/lib_dbg.c
+++ b/nuttx/libc/misc/lib_dbg.c
@@ -50,8 +50,8 @@
/* Debug output is initially disabled */
-#ifdef CONFIG_DEBUG_ENABLE
-bool g_dbgenable;
+#ifdef CONFIG_SYSLOG_ENABLE
+bool g_syslogenable;
#endif
/****************************************************************************
@@ -59,17 +59,17 @@ bool g_dbgenable;
****************************************************************************/
/****************************************************************************
- * Name: dbg_enable
+ * Name: syslog_enable
*
* Description:
* Enable or disable debug output.
*
****************************************************************************/
-#ifdef CONFIG_DEBUG_ENABLE
-void dbg_enable(bool enable)
+#ifdef CONFIG_SYSLOG_ENABLE
+void syslog_enable(bool enable)
{
- g_dbgenable = enable;
+ g_syslogenable = enable;
}
#endif
@@ -89,13 +89,13 @@ int dbg(const char *format, ...)
va_list ap;
int ret;
-#ifdef CONFIG_DEBUG_ENABLE
+#ifdef CONFIG_SYSLOG_ENABLE
ret = 0;
- if (g_dbgenable)
+ if (g_syslogenable)
#endif
{
va_start(ap, format);
- ret = lib_rawvprintf(format, ap);
+ ret = vsyslog(format, ap);
va_end(ap);
}
@@ -108,13 +108,13 @@ int lldbg(const char *format, ...)
va_list ap;
int ret;
-#ifdef CONFIG_DEBUG_ENABLE
+#ifdef CONFIG_SYSLOG_ENABLE
ret = 0;
- if (g_dbgenable)
+ if (g_syslogenable)
#endif
{
va_start(ap, format);
- ret = lib_lowvprintf(format, ap);
+ ret = lowvsyslog(format, ap);
va_end(ap);
}
@@ -128,13 +128,13 @@ int vdbg(const char *format, ...)
va_list ap;
int ret;
-#ifdef CONFIG_DEBUG_ENABLE
+#ifdef CONFIG_SYSLOG_ENABLE
ret = 0;
- if (g_dbgenable)
+ if (g_syslogenable)
#endif
{
va_start(ap, format);
- ret = lib_rawvprintf(format, ap);
+ ret = vsyslog(format, ap);
va_end(ap);
}
@@ -147,13 +147,13 @@ int llvdbg(const char *format, ...)
va_list ap;
int ret;
-#ifdef CONFIG_DEBUG_ENABLE
+#ifdef CONFIG_SYSLOG_ENABLE
ret = 0;
- if (g_dbgenable)
+ if (g_syslogenable)
#endif
{
va_start(ap, format);
- ret = lib_lowvprintf(format, ap);
+ ret = lowvsyslog(format, ap);
va_end(ap);
}