mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-01 05:51:36 +08:00
Add dmesg command that can be used to dump the syslog
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4382 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
@@ -52,7 +52,7 @@ STDIO_SRCS += lib_fopen.c lib_fclose.c lib_fread.c lib_libfread.c lib_fseek.c \
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef ($(CONFIG_SYSLOG)
|
||||
ifeq ($(CONFIG_SYSLOG),y)
|
||||
STDIO_SRCS += lib_syslogstream.c
|
||||
endif
|
||||
|
||||
|
||||
@@ -42,6 +42,10 @@
|
||||
#include <debug.h>
|
||||
#include "lib_internal.h"
|
||||
|
||||
/* This interface can only be used from within the kernel */
|
||||
|
||||
#if !defined(CONFIG_NUTTX_KERNEL) || defined(__KERNEL__)
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
@@ -113,4 +117,5 @@ int lib_lowprintf(const char *fmt, ...)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_ARCH_LOWPUTC || CONFIG_SYSLOG*/
|
||||
#endif /* CONFIG_ARCH_LOWPUTC || CONFIG_SYSLOG */
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
@@ -42,9 +42,16 @@
|
||||
#include "lib_internal.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Some output destinations are only available from within the kernel */
|
||||
|
||||
#if defined(CONFIG_NUTTX_KERNEL) && !defined(__KERNEL__)
|
||||
# undef CONFIG_SYSLOG
|
||||
# undef CONFIG_ARCH_LOWPUTC
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Type Declarations
|
||||
****************************************************************************/
|
||||
|
||||
@@ -75,7 +75,7 @@ static void syslogstream_putc(FAR struct lib_outstream_s *this, int ch)
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lib_sylogstream
|
||||
* Name: lib_syslogstream
|
||||
*
|
||||
* Description:
|
||||
* Initializes a stream for use with the coinfigured syslog interface.
|
||||
@@ -89,7 +89,7 @@ static void syslogstream_putc(FAR struct lib_outstream_s *this, int ch)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void lib_sylogstream(FAR struct lib_outstream_s *stream)
|
||||
void lib_syslogstream(FAR struct lib_outstream_s *stream)
|
||||
{
|
||||
stream->put = syslogstream_putc;
|
||||
#ifdef CONFIG_STDIO_LINEBUFFER
|
||||
|
||||
Reference in New Issue
Block a user