mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 23:40:19 +08:00
Move RAMLOG initialize from up_initialilize.c files to syslog_initialize(). up_initialize.c files now call syslog_initialize() unconditionally
This commit is contained in:
@@ -49,7 +49,7 @@
|
|||||||
#include <nuttx/net/loopback.h>
|
#include <nuttx/net/loopback.h>
|
||||||
#include <nuttx/net/tun.h>
|
#include <nuttx/net/tun.h>
|
||||||
#include <nuttx/net/telnet.h>
|
#include <nuttx/net/telnet.h>
|
||||||
#include <nuttx/syslog/ramlog.h>
|
#include <nuttx/syslog/syslog.h>
|
||||||
#include <nuttx/syslog/syslog_console.h>
|
#include <nuttx/syslog/syslog_console.h>
|
||||||
#include <nuttx/crypto/crypto.h>
|
#include <nuttx/crypto/crypto.h>
|
||||||
|
|
||||||
@@ -248,12 +248,7 @@ void up_initialize(void)
|
|||||||
|
|
||||||
/* Initialize the system logging device */
|
/* Initialize the system logging device */
|
||||||
|
|
||||||
#ifdef CONFIG_SYSLOG_CHAR
|
|
||||||
syslog_initialize();
|
syslog_initialize();
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_RAMLOG_SYSLOG
|
|
||||||
ramlog_sysloginit();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_NETDEV_LATEINIT
|
#ifndef CONFIG_NETDEV_LATEINIT
|
||||||
/* Initialize the network */
|
/* Initialize the network */
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
#include <nuttx/net/loopback.h>
|
#include <nuttx/net/loopback.h>
|
||||||
#include <nuttx/net/tun.h>
|
#include <nuttx/net/tun.h>
|
||||||
#include <nuttx/net/telnet.h>
|
#include <nuttx/net/telnet.h>
|
||||||
#include <nuttx/syslog/ramlog.h>
|
#include <nuttx/syslog/syslog.h>
|
||||||
#include <nuttx/syslog/syslog_console.h>
|
#include <nuttx/syslog/syslog_console.h>
|
||||||
|
|
||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
@@ -267,12 +267,7 @@ void up_initialize(void)
|
|||||||
|
|
||||||
/* Initialize the system logging device */
|
/* Initialize the system logging device */
|
||||||
|
|
||||||
#ifdef CONFIG_SYSLOG_CHAR
|
|
||||||
syslog_initialize();
|
syslog_initialize();
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_RAMLOG_SYSLOG
|
|
||||||
ramlog_sysloginit();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_NETDEV_LATEINIT
|
#ifndef CONFIG_NETDEV_LATEINIT
|
||||||
/* Initialize the network */
|
/* Initialize the network */
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
#include <nuttx/net/loopback.h>
|
#include <nuttx/net/loopback.h>
|
||||||
#include <nuttx/net/tun.h>
|
#include <nuttx/net/tun.h>
|
||||||
#include <nuttx/net/telnet.h>
|
#include <nuttx/net/telnet.h>
|
||||||
#include <nuttx/syslog/ramlog.h>
|
#include <nuttx/syslog/syslog.h>
|
||||||
#include <nuttx/syslog/syslog_console.h>
|
#include <nuttx/syslog/syslog_console.h>
|
||||||
|
|
||||||
#include "up_arch.h"
|
#include "up_arch.h"
|
||||||
@@ -186,12 +186,7 @@ void up_initialize(void)
|
|||||||
|
|
||||||
/* Initialize the system logging device */
|
/* Initialize the system logging device */
|
||||||
|
|
||||||
#ifdef CONFIG_SYSLOG_CHAR
|
|
||||||
syslog_initialize();
|
syslog_initialize();
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_RAMLOG_SYSLOG
|
|
||||||
ramlog_sysloginit();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_NETDEV_LATEINIT
|
#ifndef CONFIG_NETDEV_LATEINIT
|
||||||
/* Initialize the network */
|
/* Initialize the network */
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
#include <nuttx/net/loopback.h>
|
#include <nuttx/net/loopback.h>
|
||||||
#include <nuttx/net/tun.h>
|
#include <nuttx/net/tun.h>
|
||||||
#include <nuttx/net/telnet.h>
|
#include <nuttx/net/telnet.h>
|
||||||
#include <nuttx/syslog/ramlog.h>
|
#include <nuttx/syslog/syslog.h>
|
||||||
#include <nuttx/syslog/syslog_console.h>
|
#include <nuttx/syslog/syslog_console.h>
|
||||||
|
|
||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
@@ -188,12 +188,7 @@ void up_initialize(void)
|
|||||||
|
|
||||||
/* Initialize the system logging device */
|
/* Initialize the system logging device */
|
||||||
|
|
||||||
#ifdef CONFIG_SYSLOG_CHAR
|
|
||||||
syslog_initialize();
|
syslog_initialize();
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_RAMLOG_SYSLOG
|
|
||||||
ramlog_sysloginit();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_NETDEV_LATEINIT
|
#ifndef CONFIG_NETDEV_LATEINIT
|
||||||
/* Initialize the network */
|
/* Initialize the network */
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
#include <nuttx/net/loopback.h>
|
#include <nuttx/net/loopback.h>
|
||||||
#include <nuttx/net/tun.h>
|
#include <nuttx/net/tun.h>
|
||||||
#include <nuttx/net/telnet.h>
|
#include <nuttx/net/telnet.h>
|
||||||
#include <nuttx/syslog/ramlog.h>
|
#include <nuttx/syslog/syslog.h>
|
||||||
#include <nuttx/syslog/syslog_console.h>
|
#include <nuttx/syslog/syslog_console.h>
|
||||||
|
|
||||||
#include "up_arch.h"
|
#include "up_arch.h"
|
||||||
@@ -180,12 +180,7 @@ void up_initialize(void)
|
|||||||
|
|
||||||
/* Initialize the system logging device */
|
/* Initialize the system logging device */
|
||||||
|
|
||||||
#ifdef CONFIG_SYSLOG_CHAR
|
|
||||||
syslog_initialize();
|
syslog_initialize();
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_RAMLOG_SYSLOG
|
|
||||||
ramlog_sysloginit();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_NETDEV_LATEINIT
|
#ifndef CONFIG_NETDEV_LATEINIT
|
||||||
/* Initialize the network */
|
/* Initialize the network */
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
#include <nuttx/net/tun.h>
|
#include <nuttx/net/tun.h>
|
||||||
#include <nuttx/net/telnet.h>
|
#include <nuttx/net/telnet.h>
|
||||||
#include <nuttx/mtd/mtd.h>
|
#include <nuttx/mtd/mtd.h>
|
||||||
#include <nuttx/syslog/ramlog.h>
|
#include <nuttx/syslog/syslog.h>
|
||||||
#include <nuttx/syslog/syslog_console.h>
|
#include <nuttx/syslog/syslog_console.h>
|
||||||
|
|
||||||
#include "up_internal.h"
|
#include "up_internal.h"
|
||||||
@@ -168,12 +168,9 @@ void up_initialize(void)
|
|||||||
ramlog_consoleinit();
|
ramlog_consoleinit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_SYSLOG_CHAR
|
/* Initialize the system logging device */
|
||||||
|
|
||||||
syslog_initialize();
|
syslog_initialize();
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_RAMLOG_SYSLOG
|
|
||||||
ramlog_sysloginit(); /* System logging device */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CONFIG_FS_FAT) && !defined(CONFIG_DISABLE_MOUNTPOINT)
|
#if defined(CONFIG_FS_FAT) && !defined(CONFIG_DISABLE_MOUNTPOINT)
|
||||||
up_registerblockdevice(); /* Our FAT ramdisk at /dev/ram0 */
|
up_registerblockdevice(); /* Our FAT ramdisk at /dev/ram0 */
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
#include <nuttx/net/loopback.h>
|
#include <nuttx/net/loopback.h>
|
||||||
#include <nuttx/net/tun.h>
|
#include <nuttx/net/tun.h>
|
||||||
#include <nuttx/net/telnet.h>
|
#include <nuttx/net/telnet.h>
|
||||||
#include <nuttx/syslog/ramlog.h>
|
#include <nuttx/syslog/syslog.h>
|
||||||
#include <nuttx/syslog/syslog_console.h>
|
#include <nuttx/syslog/syslog_console.h>
|
||||||
|
|
||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
@@ -188,12 +188,7 @@ void up_initialize(void)
|
|||||||
|
|
||||||
/* Initialize the system logging device */
|
/* Initialize the system logging device */
|
||||||
|
|
||||||
#ifdef CONFIG_SYSLOG_CHAR
|
|
||||||
syslog_initialize();
|
syslog_initialize();
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_RAMLOG_SYSLOG
|
|
||||||
ramlog_sysloginit();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_NETDEV_LATEINIT
|
#ifndef CONFIG_NETDEV_LATEINIT
|
||||||
/* Initialize the network */
|
/* Initialize the network */
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
#include <nuttx/net/loopback.h>
|
#include <nuttx/net/loopback.h>
|
||||||
#include <nuttx/net/tun.h>
|
#include <nuttx/net/tun.h>
|
||||||
#include <nuttx/net/telnet.h>
|
#include <nuttx/net/telnet.h>
|
||||||
#include <nuttx/syslog/ramlog.h>
|
#include <nuttx/syslog/syslog.h>
|
||||||
#include <nuttx/syslog/syslog_console.h>
|
#include <nuttx/syslog/syslog_console.h>
|
||||||
|
|
||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
@@ -188,12 +188,7 @@ void up_initialize(void)
|
|||||||
|
|
||||||
/* Initialize the system logging device */
|
/* Initialize the system logging device */
|
||||||
|
|
||||||
#ifdef CONFIG_SYSLOG_CHAR
|
|
||||||
syslog_initialize();
|
syslog_initialize();
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_RAMLOG_SYSLOG
|
|
||||||
ramlog_sysloginit();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_NETDEV_LATEINIT
|
#ifndef CONFIG_NETDEV_LATEINIT
|
||||||
/* Initialize the network */
|
/* Initialize the network */
|
||||||
|
|||||||
@@ -48,7 +48,8 @@
|
|||||||
#include <nuttx/fs/loop.h>
|
#include <nuttx/fs/loop.h>
|
||||||
#include <nuttx/net/loopback.h>
|
#include <nuttx/net/loopback.h>
|
||||||
#include <nuttx/net/tun.h>
|
#include <nuttx/net/tun.h>
|
||||||
#include <nuttx/net/telnet.h>
|
#include <nuttx/syslog/syslog.h>
|
||||||
|
#include <nuttx/syslog/syslog_console.h>
|
||||||
|
|
||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
|
|
||||||
@@ -182,6 +183,10 @@ void up_initialize(void)
|
|||||||
ramlog_consoleinit();
|
ramlog_consoleinit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Initialize the system logging device */
|
||||||
|
|
||||||
|
syslog_initialize();
|
||||||
|
|
||||||
#ifndef CONFIG_NETDEV_LATEINIT
|
#ifndef CONFIG_NETDEV_LATEINIT
|
||||||
/* Initialize the network */
|
/* Initialize the network */
|
||||||
|
|
||||||
|
|||||||
@@ -704,7 +704,7 @@ int ramlog_consoleinit(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: ramlog_sysloginit
|
* Name: ramlog_syslog_initialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Use a pre-allocated RAM logging device and register it at the path
|
* Use a pre-allocated RAM logging device and register it at the path
|
||||||
@@ -716,7 +716,7 @@ int ramlog_consoleinit(void)
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_RAMLOG_SYSLOG
|
#ifdef CONFIG_RAMLOG_SYSLOG
|
||||||
int ramlog_sysloginit(void)
|
int ramlog_syslog_initialize(void)
|
||||||
{
|
{
|
||||||
/* Register the syslog character driver */
|
/* Register the syslog character driver */
|
||||||
|
|
||||||
|
|||||||
@@ -73,10 +73,16 @@ int syslog_initialize(void)
|
|||||||
|
|
||||||
/* Not much to this yet... more is coming */
|
/* Not much to this yet... more is coming */
|
||||||
|
|
||||||
#if defined(CONFIG_SYSLOG) && defined(CONFIG_SYSLOG_CHAR)
|
#if defined(CONFIG_SYSLOG_CHAR)
|
||||||
/* Enable use of a character device as the SYSLOG device */
|
/* Enable use of a character device as the SYSLOG device */
|
||||||
|
|
||||||
ret = syslog_dev_initialize();
|
ret = syslog_dev_initialize();
|
||||||
|
|
||||||
|
#elif defined(CONFIG_RAMLOG_SYSLOG)
|
||||||
|
/* Use the RAMLOG as the SYSLOG device */
|
||||||
|
|
||||||
|
ramlog_syslog_initialize();
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
/* Nothing needs to be done */
|
/* Nothing needs to be done */
|
||||||
|
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ int ramlog_consoleinit(void);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: ramlog_sysloginit
|
* Name: ramlog_syslog_initialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Create the RAM logging device and register it at the specified path.
|
* Create the RAM logging device and register it at the specified path.
|
||||||
@@ -195,7 +195,7 @@ int ramlog_consoleinit(void);
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_RAMLOG_SYSLOG
|
#ifdef CONFIG_RAMLOG_SYSLOG
|
||||||
int ramlog_sysloginit(void);
|
int ramlog_syslog_initialize(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#undef EXTERN
|
#undef EXTERN
|
||||||
|
|||||||
Reference in New Issue
Block a user