diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-02-11 15:27:44 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-02-11 15:27:44 +0000 |
commit | 4cb67b0b1b9ce6ba8c524a3a5b4fbb8f8aa184bb (patch) | |
tree | 521e0720bfb45fd55e5fb5970cae76d38f60bc4d /apps/nshlib/nsh.h | |
parent | 75e67f05d4b97efc32d95b478ec1c1f959992a4b (diff) | |
download | px4-nuttx-4cb67b0b1b9ce6ba8c524a3a5b4fbb8f8aa184bb.tar.gz px4-nuttx-4cb67b0b1b9ce6ba8c524a3a5b4fbb8f8aa184bb.tar.bz2 px4-nuttx-4cb67b0b1b9ce6ba8c524a3a5b4fbb8f8aa184bb.zip |
Add dmesg command that can be used to dump the syslog
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4382 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/nshlib/nsh.h')
-rw-r--r-- | apps/nshlib/nsh.h | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/apps/nshlib/nsh.h b/apps/nshlib/nsh.h index 90d02bb7f..46226adcd 100644 --- a/apps/nshlib/nsh.h +++ b/apps/nshlib/nsh.h @@ -218,6 +218,25 @@ # define nsh_freefullpath(p) #endif +/* The size of the I/O buffer may be specified in the + * configs/<board-name>defconfig file -- provided that it is at least as + * large as PATH_MAX. + */ + +#if CONFIG_NFILE_DESCRIPTORS > 0 +# ifdef CONFIG_NSH_FILEIOSIZE +# if CONFIG_NSH_FILEIOSIZE > (PATH_MAX + 1) +# define IOBUFFERSIZE CONFIG_NSH_FILEIOSIZE +# else +# define IOBUFFERSIZE (PATH_MAX + 1) +# endif +# else +# define IOBUFFERSIZE 1024 +# endif +# else +# define IOBUFFERSIZE (PATH_MAX + 1) +#endif + /**************************************************************************** * Public Types ****************************************************************************/ @@ -396,10 +415,13 @@ void nsh_dumpbuffer(FAR struct nsh_vtbl_s *vtbl, const char *msg, # ifndef CONFIG_NSH_DISABLE_LS int cmd_ls(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv); # endif -# if CONFIG_NFILE_STREAMS > 0 && !defined(CONFIG_NSH_DISABLESCRIPT) -# ifndef CONFIG_NSH_DISABLE_SH +# if defined(CONFIG_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) +# ifndef CONFIG_NSH_DISABLE_SH int cmd_sh(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv); -# endif +# endif # endif /* CONFIG_NFILE_STREAMS && !CONFIG_NSH_DISABLESCRIPT */ # ifndef CONFIG_DISABLE_MOUNTPOINT # ifndef CONFIG_NSH_DISABLE_LOSETUP |