diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/nshlib/nsh.h | 2 | ||||
-rw-r--r-- | apps/nshlib/nsh_fscmds.c | 8 | ||||
-rw-r--r-- | apps/nshlib/nsh_parse.c | 2 |
3 files changed, 8 insertions, 4 deletions
diff --git a/apps/nshlib/nsh.h b/apps/nshlib/nsh.h index 988106f22..e4fb1e43e 100644 --- a/apps/nshlib/nsh.h +++ b/apps/nshlib/nsh.h @@ -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) diff --git a/apps/nshlib/nsh_fscmds.c b/apps/nshlib/nsh_fscmds.c index bc723728c..f6784d5b6 100644 --- a/apps/nshlib/nsh_fscmds.c +++ b/apps/nshlib/nsh_fscmds.c @@ -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 diff --git a/apps/nshlib/nsh_parse.c b/apps/nshlib/nsh_parse.c index 93171abf7..4c4300cc6 100644 --- a/apps/nshlib/nsh_parse.c +++ b/apps/nshlib/nsh_parse.c @@ -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 |