mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-18 00:11:20 +08:00
Pack parameters of nsh_execute() as struct nsh_exec_param_s
1. Input redirect flags currently is hardcode, passing by arguments maybe better. 2. Only support redirect to path_name, redirect to fd is needed for pipeline. Test 1. Redirect in cat < /etc/init.d/rc.sysinit 2. Redirect with FIFO mkfifo /dev/testfifo cat /dev/testfifo & ls > /dev/testfifo 3. NSH Params set name `uname` echo $name Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
#endif
|
||||
|
||||
#include <nuttx/usb/usbdev_trace.h>
|
||||
#include <nshlib/nshlib.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
@@ -858,14 +859,12 @@ int nsh_command(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char *argv[]);
|
||||
|
||||
#ifdef CONFIG_NSH_BUILTIN_APPS
|
||||
int nsh_builtin(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd,
|
||||
FAR char **argv, FAR const char *redirfile_in,
|
||||
FAR const char *redirfile_out, int oflags);
|
||||
FAR char **argv, FAR const struct nsh_param_s *param);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NSH_FILE_APPS
|
||||
int nsh_fileapp(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd,
|
||||
FAR char **argv, FAR const char *redirfile_in,
|
||||
FAR const char *redirfile_out, int oflags);
|
||||
FAR char **argv, FAR const struct nsh_param_s *param);
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_DISABLE_ENVIRON
|
||||
|
Reference in New Issue
Block a user