summaryrefslogtreecommitdiff
path: root/nuttx/arch/hc
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-10-08 12:48:47 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-10-08 12:48:47 -0600
commitce145c005c24d2e785601208dfd2322e47454a5b (patch)
tree4cfe2e74efa83e9cacbb8a99ea7a48c11beb2a4d /nuttx/arch/hc
parent26710412ad35431bf2c992c2add76314962f401a (diff)
downloadnuttx-ce145c005c24d2e785601208dfd2322e47454a5b.tar.gz
nuttx-ce145c005c24d2e785601208dfd2322e47454a5b.tar.bz2
nuttx-ce145c005c24d2e785601208dfd2322e47454a5b.zip
Update everything under nuttx/arch to use the corrected syslog interfaces
Diffstat (limited to 'nuttx/arch/hc')
-rw-r--r--nuttx/arch/hc/src/m9s12/m9s12_assert.c37
1 files changed, 26 insertions, 11 deletions
diff --git a/nuttx/arch/hc/src/m9s12/m9s12_assert.c b/nuttx/arch/hc/src/m9s12/m9s12_assert.c
index 89c4c953f..9ab95d3a9 100644
--- a/nuttx/arch/hc/src/m9s12/m9s12_assert.c
+++ b/nuttx/arch/hc/src/m9s12/m9s12_assert.c
@@ -39,6 +39,17 @@
#include <nuttx/config.h>
+/* Output debug info if stack dump is selected -- even if debug is not
+ * selected.
+ */
+
+#ifdef CONFIG_ARCH_STACKDUMP
+# undef CONFIG_DEBUG
+# undef CONFIG_DEBUG_VERBOSE
+# define CONFIG_DEBUG 1
+# define CONFIG_DEBUG_VERBOSE 1
+#endif
+
#include <stdint.h>
#include <stdlib.h>
#include <assert.h>
@@ -63,15 +74,6 @@
# undef CONFIG_ARCH_USBDUMP
#endif
-/* Output debug info if stack dump is selected -- even if
- * debug is not selected.
- */
-
-#ifdef CONFIG_ARCH_STACKDUMP
-# undef lldbg
-# define lldbg lowsyslog
-#endif
-
/* The following is just intended to keep some ugliness out of the mainline
* code. We are going to print the task name if:
*
@@ -161,9 +163,22 @@ static inline void up_registerdump(void)
****************************************************************************/
#ifdef CONFIG_ARCH_USBDUMP
-static int assert_tracecallback(struct usbtrace_s *trace, void *arg)
+static int usbtrace_syslog(FAR const char *fmt, ...)
+{
+ va_list ap;
+ int ret;
+
+ /* Let vsyslog do the real work */
+
+ va_start(ap, fmt);
+ ret = lowvsyslog(LOG_INFO, fmt, ap);
+ va_end(ap);
+ return ret;
+}
+
+static int assert_tracecallback(FAR struct usbtrace_s *trace, FAR void *arg)
{
- usbtrace_trprintf((trprintf_t)lowsyslog, trace->event, trace->value);
+ usbtrace_trprintf(usbtrace_syslog, trace->event, trace->value);
return 0;
}
#endif