Add logic to re-direct debug output to a sysloggin device

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4381 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo
2012-02-11 14:20:40 +00:00
parent f03655f43a
commit bdbe8e114c
30 changed files with 541 additions and 117 deletions
+13 -2
View File
@@ -1,8 +1,8 @@
/****************************************************************************
* up_initialize.c
*
* Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
* Copyright (C) 2007-2009, 2011-2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -43,6 +43,7 @@
#include <nuttx/arch.h>
#include <nuttx/fs.h>
#include <nuttx/ramlog.h>
#include "up_internal.h"
@@ -50,6 +51,12 @@
* Private Definitions
****************************************************************************/
/* Determine which device to use as the system loggin device */
#ifndef CONFIG_SYSLOG
# undef CONFIG_RAMLOG_SYSLOG
#endif
/****************************************************************************
* Private Data
****************************************************************************/
@@ -99,6 +106,10 @@ void up_initialize(void)
devzero_register(); /* Standard /dev/zero */
up_devconsole(); /* Our private /dev/console */
#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 */
#endif