Update everything under nuttx/arch to use the corrected syslog interfaces

This commit is contained in:
Gregory Nutt
2014-10-08 12:48:47 -06:00
parent 0cd7683711
commit 7b310711a1
46 changed files with 582 additions and 381 deletions
+26 -11
View File
@@ -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>
@@ -64,15 +75,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:
*
@@ -120,9 +122,22 @@ static void up_stackdump(uint32_t sp, uint32_t stack_base)
****************************************************************************/
#ifdef CONFIG_ARCH_USBDUMP
static int assert_tracecallback(struct usbtrace_s *trace, void *arg)
static int usbtrace_syslog(FAR const char *fmt, ...)
{
usbtrace_trprintf((trprintf_t)lowsyslog, trace->event, trace->value);
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(usbtrace_syslog, trace->event, trace->value);
return 0;
}
#endif
+7 -5
View File
@@ -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 <debug.h>
#include <nuttx/irq.h>
@@ -48,11 +55,6 @@
* Pre-processor Definitions
****************************************************************************/
/* Output debug info -- even if debug is not selected. */
#undef lldbg
#define lldbg lowsyslog
/****************************************************************************
* Private Data
****************************************************************************/