summaryrefslogtreecommitdiff
path: root/nuttx/arch/sh
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/sh
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/sh')
-rw-r--r--nuttx/arch/sh/src/common/up_assert.c38
-rw-r--r--nuttx/arch/sh/src/m16c/m16c_dumpstate.c18
-rw-r--r--nuttx/arch/sh/src/sh1/sh1_dumpstate.c18
3 files changed, 43 insertions, 31 deletions
diff --git a/nuttx/arch/sh/src/common/up_assert.c b/nuttx/arch/sh/src/common/up_assert.c
index 1aab5b7ee..f53cc38dd 100644
--- a/nuttx/arch/sh/src/common/up_assert.c
+++ b/nuttx/arch/sh/src/common/up_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>
@@ -57,21 +68,13 @@
/****************************************************************************
* Definitions
****************************************************************************/
+
/* USB trace dumping */
#ifndef CONFIG_USBDEV_TRACE
# 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
-
/****************************************************************************
* Private Data
****************************************************************************/
@@ -113,9 +116,22 @@ static void _up_assert(int errorcode)
****************************************************************************/
#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
diff --git a/nuttx/arch/sh/src/m16c/m16c_dumpstate.c b/nuttx/arch/sh/src/m16c/m16c_dumpstate.c
index 41363322e..8da3c7977 100644
--- a/nuttx/arch/sh/src/m16c/m16c_dumpstate.c
+++ b/nuttx/arch/sh/src/m16c/m16c_dumpstate.c
@@ -39,6 +39,13 @@
#include <nuttx/config.h>
+/* Output debug info -- even if debug is not selected. */
+
+#undef CONFIG_DEBUG
+#undef CONFIG_DEBUG_VERBOSE
+#define CONFIG_DEBUG 1
+#define CONFIG_DEBUG_VERBOSE 1
+
#include <stdint.h>
#include <debug.h>
@@ -53,18 +60,9 @@
#ifdef CONFIG_ARCH_STACKDUMP
/****************************************************************************
- * Definitions
+ * Pre-processor Definitions
****************************************************************************/
-/* Output debug info if stack dump is selected -- even if debug is not
- * selected.
- */
-
-#ifdef CONFIG_ARCH_STACKDUMP
-# undef lldbg
-# define lldbg lowsyslog
-#endif
-
/****************************************************************************
* Private Data
****************************************************************************/
diff --git a/nuttx/arch/sh/src/sh1/sh1_dumpstate.c b/nuttx/arch/sh/src/sh1/sh1_dumpstate.c
index 5472261b3..a6e714d8c 100644
--- a/nuttx/arch/sh/src/sh1/sh1_dumpstate.c
+++ b/nuttx/arch/sh/src/sh1/sh1_dumpstate.c
@@ -39,6 +39,13 @@
#include <nuttx/config.h>
+/* Output debug info -- even if debug is not selected. */
+
+#undef CONFIG_DEBUG
+#undef CONFIG_DEBUG_VERBOSE
+#define CONFIG_DEBUG 1
+#define CONFIG_DEBUG_VERBOSE 1
+
#include <stdint.h>
#include <debug.h>
@@ -52,18 +59,9 @@
#ifdef CONFIG_ARCH_STACKDUMP
/****************************************************************************
- * Definitions
+ * Pre-processor Definitions
****************************************************************************/
-/* Output debug info if stack dump is selected -- even if
- * debug is not selected.
- */
-
-#ifdef CONFIG_ARCH_STACKDUMP
-# undef lldbg
-# define lldbg lowsyslog
-#endif
-
/****************************************************************************
* Private Data
****************************************************************************/