diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-08-16 18:39:46 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-08-16 18:39:46 +0000 |
commit | 07656e5f84288c96e871a522bb48e050ceec8551 (patch) | |
tree | 9ee3ba0a23a3c660076204af8b2a7fbf399c5ff2 /nuttx/examples/nsh/nsh_envcmds.c | |
parent | 4764ba54f9306b0e39ccf5e3a0dd2f40604ea848 (diff) | |
download | px4-nuttx-07656e5f84288c96e871a522bb48e050ceec8551.tar.gz px4-nuttx-07656e5f84288c96e871a522bb48e050ceec8551.tar.bz2 px4-nuttx-07656e5f84288c96e871a522bb48e050ceec8551.zip |
NSH redirected output
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@823 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/examples/nsh/nsh_envcmds.c')
-rw-r--r-- | nuttx/examples/nsh/nsh_envcmds.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/nuttx/examples/nsh/nsh_envcmds.c b/nuttx/examples/nsh/nsh_envcmds.c index 0a96206df..ce05fab82 100644 --- a/nuttx/examples/nsh/nsh_envcmds.c +++ b/nuttx/examples/nsh/nsh_envcmds.c @@ -79,7 +79,7 @@ * Name: cmd_echo ****************************************************************************/ -void cmd_echo(FAR void *handle, int argc, char **argv) +void cmd_echo(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) { int i; @@ -97,16 +97,16 @@ void cmd_echo(FAR void *handle, int argc, char **argv) char *value = getenv(argv[i]+1); if (value) { - nsh_output(handle, "%s ", value); + nsh_output(vtbl, "%s ", value); } } else #endif { - nsh_output(handle, "%s ", argv[i]); + nsh_output(vtbl, "%s ", argv[i]); } } - nsh_output(handle, "\n"); + nsh_output(vtbl, "\n"); } /**************************************************************************** @@ -114,11 +114,11 @@ void cmd_echo(FAR void *handle, int argc, char **argv) ****************************************************************************/ #ifndef CONFIG_DISABLE_ENVIRON -void cmd_set(FAR void *handle, int argc, char **argv) +void cmd_set(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) { if (setenv(argv[1], argv[2], TRUE) < 0) { - nsh_output(handle, g_fmtcmdfailed, argv[0], "setenv", NSH_ERRNO); + nsh_output(vtbl, g_fmtcmdfailed, argv[0], "setenv", NSH_ERRNO); } } #endif @@ -128,11 +128,11 @@ void cmd_set(FAR void *handle, int argc, char **argv) ****************************************************************************/ #ifndef CONFIG_DISABLE_ENVIRON -void cmd_unset(FAR void *handle, int argc, char **argv) +void cmd_unset(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) { if (unsetenv(argv[1]) < 0) { - nsh_output(handle, g_fmtcmdfailed, argv[0], "unsetenv", NSH_ERRNO); + nsh_output(vtbl, g_fmtcmdfailed, argv[0], "unsetenv", NSH_ERRNO); } } #endif |