JianyuWang0623 commented on code in PR #2737:
URL: https://github.com/apache/nuttx-apps/pull/2737#discussion_r1803423152


##########
include/nshlib/nshlib.h:
##########
@@ -65,6 +65,25 @@
 #  define SCHED_NSH SCHED_FIFO
 #endif
 
+struct nsh_exec_param_s

Review Comment:
   > why put into public header file, nsh_exec_param_s to nsh_param_s
   
   Both "builtin/exec_builtin.c"(`exec_builtin`) and 
"nshlib/nsh_fileapps.c"(`nsh_fileapp`) need.
   Changed to to `nsh_param_s`.



##########
nshlib/nsh_fileapps.c:
##########
@@ -107,39 +106,46 @@ int nsh_fileapp(FAR struct nsh_vtbl_s *vtbl, FAR const 
char *cmd,
       goto errout_with_actions;
     }
 
-  /* Handle redirection of input */
-
-  if (redirfile_in)
+  if (exec)

Review Comment:
   > should the call always pass a valid pointer
   
   Maybe not, e.g. cmocka does not need redirection.
   ```
   --- a/testing/cmocka/cmocka_main.c
   +++ b/testing/cmocka/cmocka_main.c
   @@ -182,7 +182,7 @@ int main(int argc, FAR char *argv[])
            }
    
          bypass[0] = (FAR char *)builtin->name;
   -      ret = exec_builtin(builtin->name, bypass, NULL, NULL, 0);
   +      ret = exec_builtin(builtin->name, bypass, NULL);
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to