Move RAMLOG driver to drivers/syslog; Add ability to output debug information to any character device or file

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4996 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2012-08-02 00:42:46 +00:00
parent 6653351013
commit e44a6924fd
3 changed files with 8 additions and 4 deletions

View File

@ -492,7 +492,7 @@ void nsh_usbtrace(void);
# ifndef CONFIG_NSH_DISABLE_LS
int cmd_ls(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
# endif
# if defined(CONFIG_SYSLOG) && !defined(CONFIG_NSH_DISABLE_DMESG)
# if defined(CONFIG_SYSLOG) && defined(CONFIG_RAMLOG_SYSLOG) && !defined(CONFIG_NSH_DISABLE_DMESG)
int cmd_dmesg(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv);
# endif
# if CONFIG_NFILE_STREAMS > 0 && !defined(CONFIG_NSH_DISABLESCRIPT)

View File

@ -59,6 +59,9 @@
# include <netinet/in.h>
# include <nuttx/fs/nfs.h>
# endif
# ifdef CONFIG_RAMLOG_SYSLOG
# include <nuttx/ramlog.h>
# endif
#endif
#endif
@ -523,10 +526,11 @@ int cmd_cat(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
* Name: cmd_dmesg
****************************************************************************/
#if CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_SYSLOG) && !defined(CONFIG_NSH_DISABLE_DMESG)
#if CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_SYSLOG) && \
defined(CONFIG_RAMLOG_SYSLOG) && !defined(CONFIG_NSH_DISABLE_DMESG)
int cmd_dmesg(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
{
return cat_common(vtbl, argv[0], "/dev/syslog");
return cat_common(vtbl, argv[0], CONFIG_SYSLOG_DEVPATH);
}
#endif

View File

@ -167,7 +167,7 @@ static const struct cmdmap_s g_cmdmap[] =
# ifndef CONFIG_NSH_DISABLE_DD
{ "dd", cmd_dd, 3, 6, "if=<infile> of=<outfile> [bs=<sectsize>] [count=<sectors>] [skip=<sectors>]" },
# endif
# if defined(CONFIG_SYSLOG) && !defined(CONFIG_NSH_DISABLE_DMESG)
# if defined(CONFIG_SYSLOG) && defined(CONFIG_RAMLOG_SYSLOG) && !defined(CONFIG_NSH_DISABLE_DMESG)
{ "dmesg", cmd_dmesg, 1, 1, NULL },
# endif
#endif