diff options
author | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-02-11 15:27:44 +0000 |
---|---|---|
committer | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-02-11 15:27:44 +0000 |
commit | 592c4f7debd04756a89b6554b06052a6ee419f3b (patch) | |
tree | 521e0720bfb45fd55e5fb5970cae76d38f60bc4d /apps/nshlib/nsh.h | |
parent | bdbe8e114ce9ca91863bd1c3ee55e680d494bf99 (diff) | |
download | px4-firmware-592c4f7debd04756a89b6554b06052a6ee419f3b.tar.gz px4-firmware-592c4f7debd04756a89b6554b06052a6ee419f3b.tar.bz2 px4-firmware-592c4f7debd04756a89b6554b06052a6ee419f3b.zip |
Add dmesg command that can be used to dump the syslog
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4382 7fd9a85b-ad96-42d3-883c-3090e2eb8679
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 |