diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-09-06 00:16:09 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-09-06 00:16:09 +0000 |
commit | 6d7ca07be40bb4cc6844dec2ec2787afb5f561d4 (patch) | |
tree | 86833d9621d6efbc4280309bc3a079d0019f6131 /nuttx/examples/nsh/nsh.h | |
parent | 1b20fc500d738afac1cc8960b4e533b94758e4c2 (diff) | |
download | px4-nuttx-6d7ca07be40bb4cc6844dec2ec2787afb5f561d4.tar.gz px4-nuttx-6d7ca07be40bb4cc6844dec2ec2787afb5f561d4.tar.bz2 px4-nuttx-6d7ca07be40bb4cc6844dec2ec2787afb5f561d4.zip |
Add get and put commands to NSH
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@880 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/examples/nsh/nsh.h')
-rw-r--r-- | nuttx/examples/nsh/nsh.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/nuttx/examples/nsh/nsh.h b/nuttx/examples/nsh/nsh.h index 861be30c2..f468a264a 100644 --- a/nuttx/examples/nsh/nsh.h +++ b/nuttx/examples/nsh/nsh.h @@ -73,9 +73,11 @@ */ #ifdef CONFIG_EXAMPLES_NSH_STRERROR -# define NSH_ERRNO strerror(errno) +# define NSH_ERRNO strerror(errno) +# define NSH_ERRNO_OF(err) strerror(err) #else -# define NSH_ERRNO errno +# define NSH_ERRNO (errno) +# define NSH_ERRNO_OF(err) (err) #endif /* Maximum size of one command line (telnet or serial) */ @@ -298,6 +300,10 @@ extern int cmd_lbracket(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv); #if defined(CONFIG_NET) extern int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv); +#if defined(CONFIG_NET_UDP) && CONFIG_NFILE_DESCRIPTORS > 0 + extern int cmd_get(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv); + extern int cmd_put(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv); +#endif #if defined(CONFIG_NET_ICMP) && defined(CONFIG_NET_ICMP_PING) && \ !defined(CONFIG_DISABLE_CLOCK) && !defined(CONFIG_DISABLE_SIGNALS) extern int cmd_ping(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv); |