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:
Gregory Nutt 2016-06-19 09:39:21 -06:00
parent de58cb6027
commit 0f18f3bd15
12 changed files with 27 additions and 54 deletions

View File

@ -49,7 +49,7 @@
#include <nuttx/net/loopback.h>
#include <nuttx/net/tun.h>
#include <nuttx/net/telnet.h>
#include <nuttx/syslog/ramlog.h>
#include <nuttx/syslog/syslog.h>
#include <nuttx/syslog/syslog_console.h>
#include <nuttx/crypto/crypto.h>
@ -248,12 +248,7 @@ void up_initialize(void)
/* Initialize the system logging device */
#ifdef CONFIG_SYSLOG_CHAR
syslog_initialize();
#endif
#ifdef CONFIG_RAMLOG_SYSLOG
ramlog_sysloginit();
#endif
#ifndef CONFIG_NETDEV_LATEINIT
/* Initialize the network */

View File

@ -48,7 +48,7 @@
#include <nuttx/net/loopback.h>
#include <nuttx/net/tun.h>
#include <nuttx/net/telnet.h>
#include <nuttx/syslog/ramlog.h>
#include <nuttx/syslog/syslog.h>
#include <nuttx/syslog/syslog_console.h>
#include <arch/board/board.h>
@ -267,12 +267,7 @@ void up_initialize(void)
/* Initialize the system logging device */
#ifdef CONFIG_SYSLOG_CHAR
syslog_initialize();
#endif
#ifdef CONFIG_RAMLOG_SYSLOG
ramlog_sysloginit();
#endif
#ifndef CONFIG_NETDEV_LATEINIT
/* Initialize the network */

View File

@ -49,7 +49,7 @@
#include <nuttx/net/loopback.h>
#include <nuttx/net/tun.h>
#include <nuttx/net/telnet.h>
#include <nuttx/syslog/ramlog.h>
#include <nuttx/syslog/syslog.h>
#include <nuttx/syslog/syslog_console.h>
#include "up_arch.h"
@ -186,12 +186,7 @@ void up_initialize(void)
/* Initialize the system logging device */
#ifdef CONFIG_SYSLOG_CHAR
syslog_initialize();
#endif
#ifdef CONFIG_RAMLOG_SYSLOG
ramlog_sysloginit();
#endif
#ifndef CONFIG_NETDEV_LATEINIT
/* Initialize the network */

View File

@ -49,7 +49,7 @@
#include <nuttx/net/loopback.h>
#include <nuttx/net/tun.h>
#include <nuttx/net/telnet.h>
#include <nuttx/syslog/ramlog.h>
#include <nuttx/syslog/syslog.h>
#include <nuttx/syslog/syslog_console.h>
#include <arch/board/board.h>
@ -188,12 +188,7 @@ void up_initialize(void)
/* Initialize the system logging device */
#ifdef CONFIG_SYSLOG_CHAR
syslog_initialize();
#endif
#ifdef CONFIG_RAMLOG_SYSLOG
ramlog_sysloginit();
#endif
#ifndef CONFIG_NETDEV_LATEINIT
/* Initialize the network */

View File

@ -49,7 +49,7 @@
#include <nuttx/net/loopback.h>
#include <nuttx/net/tun.h>
#include <nuttx/net/telnet.h>
#include <nuttx/syslog/ramlog.h>
#include <nuttx/syslog/syslog.h>
#include <nuttx/syslog/syslog_console.h>
#include "up_arch.h"
@ -180,12 +180,7 @@ void up_initialize(void)
/* Initialize the system logging device */
#ifdef CONFIG_SYSLOG_CHAR
syslog_initialize();
#endif
#ifdef CONFIG_RAMLOG_SYSLOG
ramlog_sysloginit();
#endif
#ifndef CONFIG_NETDEV_LATEINIT
/* Initialize the network */

View File

@ -50,7 +50,7 @@
#include <nuttx/net/tun.h>
#include <nuttx/net/telnet.h>
#include <nuttx/mtd/mtd.h>
#include <nuttx/syslog/ramlog.h>
#include <nuttx/syslog/syslog.h>
#include <nuttx/syslog/syslog_console.h>
#include "up_internal.h"
@ -168,12 +168,9 @@ void up_initialize(void)
ramlog_consoleinit();
#endif
#ifdef CONFIG_SYSLOG_CHAR
/* Initialize the system logging device */
syslog_initialize();
#endif
#ifdef CONFIG_RAMLOG_SYSLOG
ramlog_sysloginit(); /* System logging device */
#endif
#if defined(CONFIG_FS_FAT) && !defined(CONFIG_DISABLE_MOUNTPOINT)
up_registerblockdevice(); /* Our FAT ramdisk at /dev/ram0 */

View File

@ -49,7 +49,7 @@
#include <nuttx/net/loopback.h>
#include <nuttx/net/tun.h>
#include <nuttx/net/telnet.h>
#include <nuttx/syslog/ramlog.h>
#include <nuttx/syslog/syslog.h>
#include <nuttx/syslog/syslog_console.h>
#include <arch/board/board.h>
@ -188,12 +188,7 @@ void up_initialize(void)
/* Initialize the system logging device */
#ifdef CONFIG_SYSLOG_CHAR
syslog_initialize();
#endif
#ifdef CONFIG_RAMLOG_SYSLOG
ramlog_sysloginit();
#endif
#ifndef CONFIG_NETDEV_LATEINIT
/* Initialize the network */

View File

@ -49,7 +49,7 @@
#include <nuttx/net/loopback.h>
#include <nuttx/net/tun.h>
#include <nuttx/net/telnet.h>
#include <nuttx/syslog/ramlog.h>
#include <nuttx/syslog/syslog.h>
#include <nuttx/syslog/syslog_console.h>
#include <arch/board/board.h>
@ -188,12 +188,7 @@ void up_initialize(void)
/* Initialize the system logging device */
#ifdef CONFIG_SYSLOG_CHAR
syslog_initialize();
#endif
#ifdef CONFIG_RAMLOG_SYSLOG
ramlog_sysloginit();
#endif
#ifndef CONFIG_NETDEV_LATEINIT
/* Initialize the network */

View File

@ -48,7 +48,8 @@
#include <nuttx/fs/loop.h>
#include <nuttx/net/loopback.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>
@ -182,6 +183,10 @@ void up_initialize(void)
ramlog_consoleinit();
#endif
/* Initialize the system logging device */
syslog_initialize();
#ifndef CONFIG_NETDEV_LATEINIT
/* Initialize the network */

View File

@ -704,7 +704,7 @@ int ramlog_consoleinit(void)
#endif
/****************************************************************************
* Name: ramlog_sysloginit
* Name: ramlog_syslog_initialize
*
* Description:
* 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
int ramlog_sysloginit(void)
int ramlog_syslog_initialize(void)
{
/* Register the syslog character driver */

View File

@ -73,10 +73,16 @@ int syslog_initialize(void)
/* 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 */
ret = syslog_dev_initialize();
#elif defined(CONFIG_RAMLOG_SYSLOG)
/* Use the RAMLOG as the SYSLOG device */
ramlog_syslog_initialize();
#endif
#else
/* Nothing needs to be done */

View File

@ -183,7 +183,7 @@ int ramlog_consoleinit(void);
#endif
/****************************************************************************
* Name: ramlog_sysloginit
* Name: ramlog_syslog_initialize
*
* Description:
* Create the RAM logging device and register it at the specified path.
@ -195,7 +195,7 @@ int ramlog_consoleinit(void);
****************************************************************************/
#ifdef CONFIG_RAMLOG_SYSLOG
int ramlog_sysloginit(void);
int ramlog_syslog_initialize(void);
#endif
#undef EXTERN