forked from nuttx/nuttx-update
ramlog: Remove all ramlog_consoleinit related code
Because we can get the same function by CONSOLE_SYSLOG/syslog_console_init. BTW, it isn't a good choice to use g_ramlogfops as /dev/console since nsh will read back what it send out which will surprise most people.
This commit is contained in:
parent
f982ee43db
commit
dcaaf2d912
42 changed files with 45 additions and 261 deletions
|
@ -6929,10 +6929,6 @@ int syslog_file_channel(FAR const char *devpath);
|
|||
<p>
|
||||
<code>CONFIG_RAMLOG</code>: Enables the RAM logging feature
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
<code>CONFIG_RAMLOG_CONSOLE</code>: Use the RAM logging device as a system console. If this feature is enabled (along with <code>CONFIG_DEV_CONSOLE</code>), then all console output will be re-directed to a circular buffer in RAM. This might be useful, for example, if the only console is a Telnet console. Then in that case, console output from non-Telnet threads will go to the circular buffer and can be viewed using the NSH <code>dmesg</code> command. This optional is not useful in other scenarios.
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
<code>CONFIG_RAMLOG_SYSLOG</code>: Use the RAM logging device for the SYSLOG interface. If this feature is enabled, then all debug output will be re-directed to the circular buffer in RAM. This RAM log can be viewed from NSH using the <code>dmesg</code> command. NOTE: Unlike the limited, generic character driver SYSLOG device, the RAMLOG <i>can</i> be used to capture debug output from
|
||||
|
@ -6943,9 +6939,6 @@ int syslog_file_channel(FAR const char *devpath);
|
|||
<code>CONFIG_RAMLOG_NPOLLWAITERS</code>: The number of threads than can be waiting for this driver on <code>poll()</code>. Default: 4
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
If <code>CONFIG_RAMLOG_CONSOLE</code> or <code>CONFIG_RAMLOG_SYSLOG</code> is selected, then the following must also be provided:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>
|
||||
|
|
7
TODO
7
TODO
|
@ -2117,13 +2117,6 @@ o File system / Generic drivers (fs/, drivers/)
|
|||
Status: Open
|
||||
Priority: Medium-Low
|
||||
|
||||
Title: CONFIG_RAMLOG_CONSOLE DOES NOT WORK
|
||||
Description: When I enable CONFIG_RAMLOG_CONSOLE, the system does not come up
|
||||
properly (using configuration stm3240g-eval/nsh2). The problem
|
||||
may be an assertion that is occurring before we have a console.
|
||||
Status: Open
|
||||
Priority: Medium
|
||||
|
||||
Title: UNIFIED DESCRIPTOR REPRESENTATION
|
||||
Description: There are two separate ranges of descriptors for file and
|
||||
socket descriptors: if a descriptor is in one range then it is
|
||||
|
|
|
@ -50,7 +50,6 @@
|
|||
#include <nuttx/net/tun.h>
|
||||
#include <nuttx/net/telnet.h>
|
||||
#include <nuttx/syslog/syslog.h>
|
||||
#include <nuttx/syslog/ramlog.h>
|
||||
#include <nuttx/syslog/syslog_console.h>
|
||||
#include <nuttx/serial/pty.h>
|
||||
#include <nuttx/crypto/crypto.h>
|
||||
|
@ -194,8 +193,6 @@ void up_initialize(void)
|
|||
lwlconsole_init();
|
||||
#elif defined(CONFIG_CONSOLE_SYSLOG)
|
||||
syslog_console_init();
|
||||
#elif defined(CONFIG_RAMLOG_CONSOLE)
|
||||
ramlog_consoleinit();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PSEUDOTERM_SUSV1
|
||||
|
|
|
@ -60,14 +60,10 @@
|
|||
#ifndef CONFIG_DEV_CONSOLE
|
||||
# undef USE_SERIALDRIVER
|
||||
# undef USE_EARLYSERIALINIT
|
||||
# undef CONFIG_RAMLOG_CONSOLE
|
||||
#else
|
||||
# if defined(CONFIG_ARM_LWL_CONSOLE)
|
||||
# undef USE_SERIALDRIVER
|
||||
# undef USE_EARLYSERIALINIT
|
||||
# elif defined(CONFIG_RAMLOG_CONSOLE)
|
||||
# undef USE_SERIALDRIVER
|
||||
# undef USE_EARLYSERIALINIT
|
||||
# else
|
||||
# define USE_SERIALDRIVER 1
|
||||
# define USE_EARLYSERIALINIT 1
|
||||
|
@ -87,7 +83,7 @@
|
|||
/* Check if an interrupt stack size is configured */
|
||||
|
||||
#ifndef CONFIG_ARCH_INTERRUPTSTACK
|
||||
# define CONFIG_ARCH_INTERRUPTSTACK 0
|
||||
# define CONFIG_ARCH_INTERRUPTSTACK 0
|
||||
#endif
|
||||
|
||||
/* Macros to handle saving and restoring interrupt state. In the current ARM
|
||||
|
|
|
@ -152,12 +152,8 @@
|
|||
#ifndef CONFIG_DEV_CONSOLE
|
||||
# undef USE_SERIALDRIVER
|
||||
# undef USE_EARLYSERIALINIT
|
||||
# undef CONFIG_RAMLOG_CONSOLE
|
||||
#else
|
||||
# if defined(CONFIG_RAMLOG_CONSOLE)
|
||||
# undef USE_SERIALDRIVER
|
||||
# undef USE_EARLYSERIALINIT
|
||||
# elif defined(HAVE_RS232_DEVICE)
|
||||
# if defined(HAVE_RS232_DEVICE)
|
||||
# define USE_SERIALDRIVER 1
|
||||
# define USE_EARLYSERIALINIT 1
|
||||
# else
|
||||
|
|
|
@ -71,12 +71,8 @@
|
|||
#ifndef CONFIG_DEV_CONSOLE
|
||||
# undef USE_SERIALDRIVER
|
||||
# undef USE_EARLYSERIALINIT
|
||||
# undef CONFIG_RAMLOG_CONSOLE
|
||||
#else
|
||||
# if defined(CONFIG_RAMLOG_CONSOLE)
|
||||
# undef USE_SERIALDRIVER
|
||||
# undef USE_EARLYSERIALINIT
|
||||
# elif defined(HAVE_USART_DEVICE)
|
||||
# if defined(HAVE_USART_DEVICE)
|
||||
# define USE_SERIALDRIVER 1
|
||||
# define USE_EARLYSERIALINIT 1
|
||||
# else
|
||||
|
|
|
@ -77,12 +77,8 @@
|
|||
#ifndef CONFIG_DEV_CONSOLE
|
||||
# undef USE_SERIALDRIVER
|
||||
# undef USE_EARLYSERIALINIT
|
||||
# undef CONFIG_RAMLOG_CONSOLE
|
||||
#else
|
||||
# if defined(CONFIG_RAMLOG_CONSOLE)
|
||||
# undef USE_SERIALDRIVER
|
||||
# undef USE_EARLYSERIALINIT
|
||||
# elif defined(HAVE_USART_DEVICE)
|
||||
# if defined(HAVE_USART_DEVICE)
|
||||
# define USE_SERIALDRIVER 1
|
||||
# define USE_EARLYSERIALINIT 1
|
||||
# else
|
||||
|
|
|
@ -76,15 +76,9 @@
|
|||
#ifndef CONFIG_DEV_CONSOLE
|
||||
# undef USE_SERIALDRIVER
|
||||
# undef USE_EARLYSERIALINIT
|
||||
# undef CONFIG_RAMLOG_CONSOLE
|
||||
#else
|
||||
# if defined(CONFIG_RAMLOG_CONSOLE)
|
||||
# undef USE_SERIALDRIVER
|
||||
# undef USE_EARLYSERIALINIT
|
||||
# else
|
||||
# define USE_SERIALDRIVER 1
|
||||
# define USE_EARLYSERIALINIT 1
|
||||
# endif
|
||||
# define USE_SERIALDRIVER 1
|
||||
# define USE_EARLYSERIALINIT 1
|
||||
#endif
|
||||
|
||||
/* If some other device is used as the console, then the serial driver may
|
||||
|
@ -228,8 +222,6 @@ void up_initialize(void)
|
|||
|
||||
#if defined(CONFIG_CONSOLE_SYSLOG)
|
||||
syslog_console_init();
|
||||
#elif defined(CONFIG_RAMLOG_CONSOLE)
|
||||
ramlog_consoleinit();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PSEUDOTERM_SUSV1
|
||||
|
|
|
@ -155,8 +155,6 @@ void up_initialize(void)
|
|||
|
||||
#if defined(CONFIG_CONSOLE_SYSLOG)
|
||||
syslog_console_init();
|
||||
#elif defined(CONFIG_RAMLOG_CONSOLE)
|
||||
ramlog_consoleinit();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PSEUDOTERM_SUSV1
|
||||
|
|
|
@ -60,15 +60,9 @@
|
|||
#ifndef CONFIG_DEV_CONSOLE
|
||||
# undef USE_SERIALDRIVER
|
||||
# undef USE_EARLYSERIALINIT
|
||||
# undef CONFIG_RAMLOG_CONSOLE
|
||||
#else
|
||||
# if defined(CONFIG_RAMLOG_CONSOLE)
|
||||
# undef USE_SERIALDRIVER
|
||||
# undef USE_EARLYSERIALINIT
|
||||
# else
|
||||
# define USE_SERIALDRIVER 1
|
||||
# define USE_EARLYSERIALINIT 1
|
||||
# endif
|
||||
# define USE_SERIALDRIVER 1
|
||||
# define USE_EARLYSERIALINIT 1
|
||||
#endif
|
||||
|
||||
/* If some other device is used as the console, then the serial driver may
|
||||
|
@ -78,13 +72,13 @@
|
|||
*/
|
||||
|
||||
#if !defined(USE_SERIALDRIVER) && defined(CONFIG_STANDARD_SERIAL)
|
||||
# define USE_SERIALDRIVER 1
|
||||
# define USE_SERIALDRIVER 1
|
||||
#endif
|
||||
|
||||
/* Check if an interrupt stack size is configured */
|
||||
|
||||
#ifndef CONFIG_ARCH_INTERRUPTSTACK
|
||||
# define CONFIG_ARCH_INTERRUPTSTACK 0
|
||||
# define CONFIG_ARCH_INTERRUPTSTACK 0
|
||||
#endif
|
||||
|
||||
/* Macros to handle saving and restore interrupt state. In the current CPU12
|
||||
|
|
|
@ -157,8 +157,6 @@ void up_initialize(void)
|
|||
|
||||
#if defined(CONFIG_CONSOLE_SYSLOG)
|
||||
syslog_console_init();
|
||||
#elif defined(CONFIG_RAMLOG_CONSOLE)
|
||||
ramlog_consoleinit();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PSEUDOTERM_SUSV1
|
||||
|
|
|
@ -57,15 +57,9 @@
|
|||
#ifndef CONFIG_DEV_CONSOLE
|
||||
# undef USE_SERIALDRIVER
|
||||
# undef USE_EARLYSERIALINIT
|
||||
# undef CONFIG_RAMLOG_CONSOLE
|
||||
#else
|
||||
# if defined(CONFIG_RAMLOG_CONSOLE)
|
||||
# undef USE_SERIALDRIVER
|
||||
# undef USE_EARLYSERIALINIT
|
||||
# else
|
||||
# define USE_SERIALDRIVER 1
|
||||
# define USE_EARLYSERIALINIT 1
|
||||
# endif
|
||||
# define USE_SERIALDRIVER 1
|
||||
# define USE_EARLYSERIALINIT 1
|
||||
#endif
|
||||
|
||||
/* If some other device is used as the console, then the serial driver may
|
||||
|
@ -81,7 +75,7 @@
|
|||
/* Check if an interrupt stack size is configured */
|
||||
|
||||
#ifndef CONFIG_ARCH_INTERRUPTSTACK
|
||||
# define CONFIG_ARCH_INTERRUPTSTACK 0
|
||||
# define CONFIG_ARCH_INTERRUPTSTACK 0
|
||||
#endif
|
||||
|
||||
/* In the MIPS model, the state is copied from the stack to the TCB, but
|
||||
|
|
|
@ -77,15 +77,9 @@
|
|||
#ifndef CONFIG_DEV_CONSOLE
|
||||
# undef USE_SERIALDRIVER
|
||||
# undef USE_EARLYSERIALINIT
|
||||
# undef CONFIG_RAMLOG_CONSOLE
|
||||
#else
|
||||
# if defined(CONFIG_RAMLOG_CONSOLE)
|
||||
# undef USE_SERIALDRIVER
|
||||
# undef USE_EARLYSERIALINIT
|
||||
# else
|
||||
# define USE_SERIALDRIVER 1
|
||||
# define USE_EARLYSERIALINIT 1
|
||||
# endif
|
||||
# define USE_SERIALDRIVER 1
|
||||
# define USE_EARLYSERIALINIT 1
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
|
|
@ -77,15 +77,9 @@
|
|||
#ifndef CONFIG_DEV_CONSOLE
|
||||
# undef USE_SERIALDRIVER
|
||||
# undef USE_EARLYSERIALINIT
|
||||
# undef CONFIG_RAMLOG_CONSOLE
|
||||
#else
|
||||
# if defined(CONFIG_RAMLOG_CONSOLE)
|
||||
# undef USE_SERIALDRIVER
|
||||
# undef USE_EARLYSERIALINIT
|
||||
# else
|
||||
# define USE_SERIALDRIVER 1
|
||||
# define USE_EARLYSERIALINIT 1
|
||||
# endif
|
||||
# define USE_SERIALDRIVER 1
|
||||
# define USE_EARLYSERIALINIT 1
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
|
|
@ -248,8 +248,6 @@ void up_initialize(void)
|
|||
|
||||
#if defined(CONFIG_CONSOLE_SYSLOG)
|
||||
syslog_console_init();
|
||||
#elif defined(CONFIG_RAMLOG_CONSOLE)
|
||||
ramlog_consoleinit();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PSEUDOTERM_SUSV1
|
||||
|
|
|
@ -60,15 +60,9 @@
|
|||
#ifndef CONFIG_DEV_CONSOLE
|
||||
# undef USE_SERIALDRIVER
|
||||
# undef USE_EARLYSERIALINIT
|
||||
# undef CONFIG_RAMLOG_CONSOLE
|
||||
#else
|
||||
# if defined(CONFIG_RAMLOG_CONSOLE)
|
||||
# undef USE_SERIALDRIVER
|
||||
# undef USE_EARLYSERIALINIT
|
||||
# else
|
||||
# define USE_SERIALDRIVER 1
|
||||
# define USE_EARLYSERIALINIT 1
|
||||
# endif
|
||||
# define USE_SERIALDRIVER 1
|
||||
# define USE_EARLYSERIALINIT 1
|
||||
#endif
|
||||
|
||||
/* If some other device is used as the console, then the serial driver may
|
||||
|
@ -84,7 +78,7 @@
|
|||
/* Check if an interrupt stack size is configured */
|
||||
|
||||
#ifndef CONFIG_ARCH_INTERRUPTSTACK
|
||||
# define CONFIG_ARCH_INTERRUPTSTACK 0
|
||||
# define CONFIG_ARCH_INTERRUPTSTACK 0
|
||||
#endif
|
||||
|
||||
#define up_savestate(regs) up_copyfullstate(regs, (uint32_t*)CURRENT_REGS)
|
||||
|
|
|
@ -141,8 +141,6 @@ void up_initialize(void)
|
|||
|
||||
#if defined(CONFIG_CONSOLE_SYSLOG)
|
||||
syslog_console_init();
|
||||
#elif defined(CONFIG_RAMLOG_CONSOLE)
|
||||
ramlog_consoleinit();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PSEUDOTERM_SUSV1
|
||||
|
|
|
@ -65,15 +65,9 @@
|
|||
#ifndef CONFIG_DEV_CONSOLE
|
||||
# undef USE_SERIALDRIVER
|
||||
# undef USE_EARLYSERIALINIT
|
||||
# undef CONFIG_RAMLOG_CONSOLE
|
||||
#else
|
||||
# if defined(CONFIG_RAMLOG_CONSOLE)
|
||||
# undef USE_SERIALDRIVER
|
||||
# undef USE_EARLYSERIALINIT
|
||||
# else
|
||||
# define USE_SERIALDRIVER 1
|
||||
# define USE_EARLYSERIALINIT 1
|
||||
# endif
|
||||
# define USE_SERIALDRIVER 1
|
||||
# define USE_EARLYSERIALINIT 1
|
||||
#endif
|
||||
|
||||
/* If some other device is used as the console, then the serial driver may
|
||||
|
@ -89,7 +83,7 @@
|
|||
/* Check if an interrupt stack size is configured */
|
||||
|
||||
#ifndef CONFIG_ARCH_INTERRUPTSTACK
|
||||
# define CONFIG_ARCH_INTERRUPTSTACK 0
|
||||
# define CONFIG_ARCH_INTERRUPTSTACK 0
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
|
|
@ -139,8 +139,6 @@ void up_initialize(void)
|
|||
|
||||
#if defined(CONFIG_CONSOLE_SYSLOG)
|
||||
syslog_console_init();
|
||||
#elif defined(CONFIG_RAMLOG_CONSOLE)
|
||||
ramlog_consoleinit();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PSEUDOTERM_SUSV1
|
||||
|
@ -156,9 +154,5 @@ void up_initialize(void)
|
|||
|
||||
syslog_initialize(SYSLOG_INIT_EARLY);
|
||||
|
||||
#ifdef CONFIG_RAMLOG_SYSLOG
|
||||
ramlog_sysloginit();
|
||||
#endif
|
||||
|
||||
board_autoled_on(LED_IRQSENABLED);
|
||||
}
|
||||
|
|
|
@ -85,15 +85,9 @@
|
|||
#ifndef CONFIG_DEV_CONSOLE
|
||||
# undef USE_SERIALDRIVER
|
||||
# undef USE_EARLYSERIALINIT
|
||||
# undef CONFIG_RAMLOG_CONSOLE
|
||||
#else
|
||||
# if defined(CONFIG_RAMLOG_CONSOLE)
|
||||
# undef USE_SERIALDRIVER
|
||||
# undef USE_EARLYSERIALINIT
|
||||
# else
|
||||
# define USE_SERIALDRIVER 1
|
||||
# define USE_EARLYSERIALINIT 1
|
||||
# endif
|
||||
# define USE_SERIALDRIVER 1
|
||||
# define USE_EARLYSERIALINIT 1
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
|
|
@ -232,8 +232,6 @@ void up_initialize(void)
|
|||
up_devconsole(); /* Our private /dev/console */
|
||||
#elif defined(CONFIG_CONSOLE_SYSLOG)
|
||||
syslog_console_init();
|
||||
#elif defined(CONFIG_RAMLOG_CONSOLE)
|
||||
ramlog_consoleinit();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PSEUDOTERM_SUSV1
|
||||
|
|
|
@ -89,9 +89,8 @@
|
|||
|
||||
#ifndef CONFIG_DEV_CONSOLE
|
||||
# undef USE_DEVCONSOLE
|
||||
# undef CONFIG_RAMLOG_CONSOLE
|
||||
#else
|
||||
# if defined(CONFIG_RAMLOG_CONSOLE) || defined(CONFIG_SYSLOG_RPMSG)
|
||||
# ifdef CONFIG_SYSLOG_RPMSG
|
||||
# undef USE_DEVCONSOLE
|
||||
# else
|
||||
# define USE_DEVCONSOLE 1
|
||||
|
|
|
@ -157,8 +157,6 @@ void up_initialize(void)
|
|||
|
||||
#if defined(CONFIG_CONSOLE_SYSLOG)
|
||||
syslog_console_init();
|
||||
#elif defined(CONFIG_RAMLOG_CONSOLE)
|
||||
ramlog_consoleinit();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PSEUDOTERM_SUSV1
|
||||
|
|
|
@ -59,15 +59,9 @@
|
|||
#ifndef CONFIG_DEV_CONSOLE
|
||||
# undef USE_SERIALDRIVER
|
||||
# undef USE_EARLYSERIALINIT
|
||||
# undef CONFIG_RAMLOG_CONSOLE
|
||||
#else
|
||||
# if defined(CONFIG_RAMLOG_CONSOLE)
|
||||
# undef USE_SERIALDRIVER
|
||||
# undef USE_EARLYSERIALINIT
|
||||
# else
|
||||
# define USE_SERIALDRIVER 1
|
||||
# define USE_EARLYSERIALINIT 1
|
||||
# endif
|
||||
# define USE_SERIALDRIVER 1
|
||||
# define USE_EARLYSERIALINIT 1
|
||||
#endif
|
||||
|
||||
/* If some other device is used as the console, then the serial driver may
|
||||
|
@ -83,7 +77,7 @@
|
|||
/* Check if an interrupt stack size is configured */
|
||||
|
||||
#ifndef CONFIG_ARCH_INTERRUPTSTACK
|
||||
# define CONFIG_ARCH_INTERRUPTSTACK 0
|
||||
# define CONFIG_ARCH_INTERRUPTSTACK 0
|
||||
#endif
|
||||
|
||||
/* Macros to handle saving and restore interrupt state. In the current
|
||||
|
|
|
@ -60,15 +60,9 @@
|
|||
#ifndef CONFIG_DEV_CONSOLE
|
||||
# undef USE_SERIALDRIVER
|
||||
# undef USE_EARLYSERIALINIT
|
||||
# undef CONFIG_RAMLOG_CONSOLE
|
||||
#else
|
||||
# if defined(CONFIG_RAMLOG_CONSOLE)
|
||||
# undef USE_SERIALDRIVER
|
||||
# undef USE_EARLYSERIALINIT
|
||||
# else
|
||||
# define USE_SERIALDRIVER 1
|
||||
# define USE_EARLYSERIALINIT 1
|
||||
# endif
|
||||
# define USE_SERIALDRIVER 1
|
||||
# define USE_EARLYSERIALINIT 1
|
||||
#endif
|
||||
|
||||
/* If some other device is used as the console, then the serial driver may
|
||||
|
|
|
@ -165,8 +165,6 @@ void up_initialize(void)
|
|||
|
||||
#if defined(CONFIG_CONSOLE_SYSLOG)
|
||||
syslog_console_init();
|
||||
#elif defined(CONFIG_RAMLOG_CONSOLE)
|
||||
ramlog_consoleinit();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PSEUDOTERM_SUSV1
|
||||
|
|
|
@ -157,8 +157,6 @@ void up_initialize(void)
|
|||
|
||||
#if defined(CONFIG_CONSOLE_SYSLOG)
|
||||
syslog_console_init();
|
||||
#elif defined(CONFIG_RAMLOG_CONSOLE)
|
||||
ramlog_consoleinit();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PSEUDOTERM_SUSV1
|
||||
|
|
|
@ -66,15 +66,9 @@
|
|||
#elif !defined(CONFIG_DEV_CONSOLE)
|
||||
# undef USE_SERIALDRIVER
|
||||
# undef USE_EARLYSERIALINIT
|
||||
# undef CONFIG_RAMLOG_CONSOLE
|
||||
#else
|
||||
# if defined(CONFIG_RAMLOG_CONSOLE)
|
||||
# undef USE_SERIALDRIVER
|
||||
# undef USE_EARLYSERIALINIT
|
||||
# else
|
||||
# define USE_SERIALDRIVER 1
|
||||
# define USE_EARLYSERIALINIT 1
|
||||
# endif
|
||||
# define USE_SERIALDRIVER 1
|
||||
# define USE_EARLYSERIALINIT 1
|
||||
#endif
|
||||
|
||||
/* If some other device is used as the console, then the serial driver may
|
||||
|
|
|
@ -156,8 +156,6 @@ void up_initialize(void)
|
|||
|
||||
#if defined(CONFIG_CONSOLE_SYSLOG)
|
||||
syslog_console_init();
|
||||
#elif defined(CONFIG_RAMLOG_CONSOLE)
|
||||
ramlog_consoleinit();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PSEUDOTERM_SUSV1
|
||||
|
|
|
@ -59,11 +59,8 @@
|
|||
|
||||
#if !defined(CONFIG_DEV_CONSOLE)
|
||||
# undef USE_SERIALDRIVER
|
||||
# undef CONFIG_RAMLOG_CONSOLE
|
||||
#else
|
||||
# if defined(CONFIG_RAMLOG_CONSOLE)
|
||||
# undef USE_SERIALDRIVER
|
||||
# elif defined(CONFIG_CONSOLE_SYSLOG)
|
||||
# if defined(CONFIG_CONSOLE_SYSLOG)
|
||||
# undef USE_SERIALDRIVER
|
||||
# else
|
||||
# define USE_SERIALDRIVER 1
|
||||
|
@ -126,14 +123,6 @@ void syslog_console_init();
|
|||
# define syslog_console_init()
|
||||
#endif
|
||||
|
||||
/* Defined in drivers/ramlog.c */
|
||||
|
||||
#ifdef CONFIG_RAMLOG_CONSOLE
|
||||
void ramlog_consoleinit(void);
|
||||
#else
|
||||
# define ramlog_consoleinit()
|
||||
#endif
|
||||
|
||||
/* Low level string output */
|
||||
|
||||
void up_puts(const char *str);
|
||||
|
|
|
@ -834,7 +834,6 @@ Configurations
|
|||
|
||||
Device Drivers:
|
||||
CONFIG_RAMLOG=y : Enable the RAM-based logging feature.
|
||||
CONFIG_RAMLOG_CONSOLE=n : (We don't use the RAMLOG console)
|
||||
CONFIG_RAMLOG_SYSLOG=y : This enables the RAM-based logger as the
|
||||
system logger.
|
||||
CONFIG_RAMLOG_NONBLOCKING=y : Needs to be non-blocking for dmesg
|
||||
|
|
|
@ -4300,7 +4300,6 @@ Configurations
|
|||
|
||||
Device Drivers:
|
||||
CONFIG_RAMLOG=y : Enable the RAM-based logging feature.
|
||||
CONFIG_RAMLOG_CONSOLE=n : (We don't use the RAMLOG console)
|
||||
CONFIG_RAMLOG_SYSLOG=y : This enables the RAM-based logger as the
|
||||
system logger.
|
||||
CONFIG_RAMLOG_NONBLOCKING=y : Needs to be non-blocking for dmesg
|
||||
|
|
|
@ -1877,7 +1877,6 @@ Configuration sub-directories
|
|||
|
||||
Device Drivers:
|
||||
CONFIG_RAMLOG=y : Enable the RAM-based logging feature.
|
||||
CONFIG_RAMLOG_CONSOLE=n : (We don't use the RAMLOG console)
|
||||
CONFIG_RAMLOG_SYSLOG=y : This enables the RAM-based logger as the
|
||||
system logger.
|
||||
CONFIG_RAMLOG_NONBLOCKING=y : Needs to be non-blocking for dmesg
|
||||
|
|
|
@ -406,7 +406,6 @@ Configurations
|
|||
|
||||
Device Drivers:
|
||||
CONFIG_RAMLOG=y : Enable the RAM-based logging feature.
|
||||
CONFIG_RAMLOG_CONSOLE=n : (We don't use the RAMLOG console)
|
||||
CONFIG_RAMLOG_SYSLOG=y : This enables the RAM-based logger as the
|
||||
system logger.
|
||||
CONFIG_RAMLOG_NONBLOCKING=y : Needs to be non-blocking for dmesg
|
||||
|
|
|
@ -734,7 +734,7 @@ Where <subdir> is one of the following:
|
|||
There are some special settings to make life with only a Telnet
|
||||
|
||||
CONFIG_RAMLOG=y - Enable the RAM-based logging feature.
|
||||
CONFIG_RAMLOG_CONSOLE=y - Use the RAM logger as the default console.
|
||||
CONFIG_CONSOLE_SYSLOG=y - Use the RAM logger as the default console.
|
||||
This means that any console output from non-Telnet threads will
|
||||
go into the circular buffer in RAM.
|
||||
CONFIG_RAMLOG_SYSLOG - This enables the RAM-based logger as the
|
||||
|
|
|
@ -1104,7 +1104,7 @@ Where <subdir> is one of the following:
|
|||
There are some special settings to make life with only a Telnet
|
||||
|
||||
CONFIG_RAMLOG=y - Enable the RAM-based logging feature.
|
||||
CONFIG_RAMLOG_CONSOLE=y - Use the RAM logger as the default console.
|
||||
CONFIG_CONSOLE_SYSLOG=y - Use the RAM logger as the default console.
|
||||
This means that any console output from non-Telnet threads will
|
||||
go into the circular buffer in RAM.
|
||||
CONFIG_RAMLOG_SYSLOG - This enables the RAM-based logger as the
|
||||
|
|
|
@ -1111,7 +1111,6 @@ Where <subdir> is one of the following:
|
|||
3. The RAM log is enabled"
|
||||
|
||||
CONFIG_RAMLOG=y : Enable the RAM-based logging feature.
|
||||
CONFIG_RAMLOG_CONSOLE=n : (there is no default console device)
|
||||
CONFIG_RAMLOG_SYSLOG=y : This enables the RAM-based logger as the
|
||||
system logger.
|
||||
|
||||
|
|
|
@ -893,7 +893,6 @@ Where <subdir> is one of the following:
|
|||
|
||||
Device Drivers -> System Logging Device Options:
|
||||
CONFIG_RAMLOG=y : Enable the RAM-based logging feature.
|
||||
CONFIG_RAMLOG_CONSOLE=n : (there is no default console device)
|
||||
CONFIG_RAMLOG_SYSLOG=y : This enables the RAM-based logger as the
|
||||
system logger.
|
||||
|
||||
|
|
|
@ -32,21 +32,10 @@ config RAMLOG
|
|||
details as needed to support logging.
|
||||
|
||||
if RAMLOG
|
||||
config RAMLOG_CONSOLE
|
||||
bool "Use RAMLOG for /dev/console"
|
||||
default n
|
||||
depends on DEV_CONSOLE
|
||||
---help---
|
||||
Use the RAM logging device as a system console. If this feature is enabled (along
|
||||
with DEV_CONSOLE), then all console output will be re-directed to a circular
|
||||
buffer in RAM. This is useful, for example, if the only console is a Telnet
|
||||
console. Then in that case, console output from non-Telnet threads will go to
|
||||
the circular buffer and can be viewed using the NSH 'dmesg' command.
|
||||
|
||||
config RAMLOG_BUFSIZE
|
||||
int "RAMLOG buffer size"
|
||||
default 1024
|
||||
depends on RAMLOG_SYSLOG || RAMLOG_CONSOLE
|
||||
depends on RAMLOG_SYSLOG
|
||||
---help---
|
||||
Size of the console RAM log. Default: 1024
|
||||
|
||||
|
|
|
@ -469,13 +469,6 @@ RAM Logging Device
|
|||
----------------------------
|
||||
|
||||
* CONFIG_RAMLOG - Enables the RAM logging feature
|
||||
* CONFIG_RAMLOG_CONSOLE - Use the RAM logging device as a system
|
||||
console. If this feature is enabled (along with CONFIG_DEV_CONSOLE),
|
||||
then all console output will be re-directed to a circular buffer in
|
||||
RAM. This might be useful, for example, if the only console is a
|
||||
Telnet console. Then in that case, console output from non-Telnet
|
||||
threads will go to the circular buffer and can be viewed using the NSH
|
||||
dmesg command. This optional is not useful in other scenarios.
|
||||
* CONFIG_RAMLOG_SYSLOG - Use the RAM logging device for the syslogging
|
||||
interface. If this feature is enabled, then all debug output (only)
|
||||
will be re-directed to the circular buffer in RAM. This RAM log can
|
||||
|
@ -485,8 +478,8 @@ RAM Logging Device
|
|||
* CONFIG_RAMLOG_NPOLLWAITERS - The number of threads than can be waiting
|
||||
for this driver on poll(). Default: 4
|
||||
|
||||
If CONFIG_RAMLOG_CONSOLE or CONFIG_RAMLOG_SYSLOG is selected, then the
|
||||
following must also be provided:
|
||||
If CONFIG_RAMLOG_SYSLOG is selected, then the following must also be
|
||||
provided:
|
||||
|
||||
* CONFIG_RAMLOG_BUFSIZE - The size of the circular buffer to use.
|
||||
Default: 1024 bytes.
|
||||
|
|
|
@ -152,7 +152,7 @@ static const struct file_operations g_ramlogfops =
|
|||
* for the syslogging function.
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_RAMLOG_CONSOLE) || defined(CONFIG_RAMLOG_SYSLOG)
|
||||
#ifdef CONFIG_RAMLOG_SYSLOG
|
||||
static char g_sysbuffer[CONFIG_RAMLOG_BUFSIZE];
|
||||
|
||||
/* This is the device structure for the console or syslogging function. It
|
||||
|
@ -677,7 +677,6 @@ errout:
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if !defined(CONFIG_RAMLOG_CONSOLE) && !defined(CONFIG_RAMLOG_SYSLOG)
|
||||
int ramlog_register(FAR const char *devpath, FAR char *buffer, size_t buflen)
|
||||
{
|
||||
FAR struct ramlog_dev_s *priv;
|
||||
|
@ -719,26 +718,6 @@ int ramlog_register(FAR const char *devpath, FAR char *buffer, size_t buflen)
|
|||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: ramlog_consoleinit
|
||||
*
|
||||
* Description:
|
||||
* Use a pre-allocated RAM logging device and register it at /dev/console
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_RAMLOG_CONSOLE
|
||||
int ramlog_consoleinit(void)
|
||||
{
|
||||
FAR struct ramlog_dev_s *priv = &g_sysdev;
|
||||
|
||||
/* Register the console character driver */
|
||||
|
||||
return register_driver("/dev/console", &g_ramlogfops, 0666, priv);
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: ramlog_syslog_channel
|
||||
|
@ -747,9 +726,6 @@ int ramlog_consoleinit(void)
|
|||
* Use a pre-allocated RAM logging device and register it at the path
|
||||
* specified by CONFIG_RAMLOG_SYSLOG
|
||||
*
|
||||
* If CONFIG_RAMLOG_CONSOLE is also defined, then this functionality is
|
||||
* performed when ramlog_consoleinit() is called.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_RAMLOG_SYSLOG
|
||||
|
@ -779,7 +755,7 @@ int ramlog_syslog_channel(void)
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_RAMLOG_CONSOLE) || defined(CONFIG_RAMLOG_SYSLOG)
|
||||
#ifdef CONFIG_RAMLOG_SYSLOG
|
||||
int ramlog_putc(int ch)
|
||||
{
|
||||
FAR struct ramlog_dev_s *priv = &g_sysdev;
|
||||
|
|
|
@ -66,12 +66,6 @@
|
|||
/* Configuration ************************************************************/
|
||||
|
||||
/* CONFIG_RAMLOG - Enables the RAM logging feature
|
||||
* CONFIG_RAMLOG_CONSOLE - Use the RAM logging device as a system console.
|
||||
* If this feature is enabled (along with CONFIG_DEV_CONSOLE), then all
|
||||
* console output will be re-directed to a circular buffer in RAM. This
|
||||
* is useful, for example, if the only console is a Telnet console. Then
|
||||
* in that case, console output from non-Telnet threads will go to the
|
||||
* circular buffer and can be viewed using the NSH 'dmesg' command.
|
||||
* CONFIG_RAMLOG_SYSLOG - Use the RAM logging device for the syslogging
|
||||
* interface. If this feature is enabled then all debug output (only)
|
||||
* will be re-directed to the circular buffer in RAM. This RAM log can
|
||||
|
@ -81,16 +75,12 @@
|
|||
* CONFIG_RAMLOG_NPOLLWAITERS - The number of threads than can be waiting
|
||||
* for this driver on poll(). Default: 4
|
||||
*
|
||||
* If CONFIG_RAMLOG_CONSOLE or CONFIG_RAMLOG_SYSLOG is selected, then the
|
||||
* following may also be provided:
|
||||
* If CONFIG_RAMLOG_SYSLOG is selected, then the following may also be
|
||||
* provided:
|
||||
*
|
||||
* CONFIG_RAMLOG_BUFSIZE - Size of the console RAM log. Default: 1024
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_DEV_CONSOLE
|
||||
# undef CONFIG_RAMLOG_CONSOLE
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_RAMLOG_SYSLOG) && !defined(CONFIG_SYSLOG_DEVPATH)
|
||||
# define CONFIG_SYSLOG_DEVPATH "/dev/ramlog"
|
||||
#endif
|
||||
|
@ -130,32 +120,14 @@ extern "C"
|
|||
*
|
||||
* This interface is not normally used but can be made available is
|
||||
* someone just wants to tinker with the RAM log as a generic character
|
||||
* device. Normally both CONFIG_RAMLOG_CONSOLE and CONFIG_RAMLOG_SYSLOG
|
||||
* device. Normally both CONFIG_CONSOLE_SYSLOG and CONFIG_RAMLOG_SYSLOG
|
||||
* would be set (to capture all output in the log) -OR- just
|
||||
* CONFIG_RAMLOG_SYSLOG would be set to capture debug output only
|
||||
* in the log.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if !defined(CONFIG_RAMLOG_CONSOLE) && !defined(CONFIG_RAMLOG_SYSLOG)
|
||||
int ramlog_register(FAR const char *devpath, FAR char *buffer, size_t buflen);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: ramlog_consoleinit
|
||||
*
|
||||
* Description:
|
||||
* Create the RAM logging device and register it at the specified path.
|
||||
* Mostly likely this path will be /dev/console.
|
||||
*
|
||||
* If CONFIG_RAMLOG_SYSLOG is also defined, then the same RAM logging
|
||||
* device is also registered at CONFIG_SYSLOG_DEVPATH
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_RAMLOG_CONSOLE
|
||||
int ramlog_consoleinit(void);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: ramlog_syslog_channel
|
||||
|
@ -164,9 +136,6 @@ int ramlog_consoleinit(void);
|
|||
* Create the RAM logging device and register it at the specified path.
|
||||
* Mostly likely this path will be CONFIG_SYSLOG_DEVPATH
|
||||
*
|
||||
* If CONFIG_RAMLOG_CONSOLE is also defined, then this functionality is
|
||||
* performed when ramlog_consoleinit() is called.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_RAMLOG_SYSLOG
|
||||
|
@ -181,7 +150,7 @@ int ramlog_syslog_channel(void);
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_RAMLOG_CONSOLE) || defined(CONFIG_RAMLOG_SYSLOG)
|
||||
#ifdef CONFIG_RAMLOG_SYSLOG
|
||||
int ramlog_putc(int ch);
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue