mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 23:03:27 +08:00
Update everything under nuttx/arch to use the corrected syslog interfaces
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
****************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user