nuttx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #185: nsh improvement
Date Sat, 18 Apr 2020 11:27:12 GMT
xiaoxiang781216 commented on a change in pull request #185: nsh improvement
URL: https://github.com/apache/incubator-nuttx-apps/pull/185#discussion_r410685725
 
 

 ##########
 File path: nshlib/nsh_command.c
 ##########
 @@ -481,6 +481,10 @@ static const struct cmdmap_s g_cmdmap[] =
 #if CONFIG_NFILE_STREAMS > 0 && !defined(CONFIG_NSH_DISABLESCRIPT)
 #if !defined(CONFIG_NSH_DISABLE_SH) && defined(CONFIG_SYSTEM_SYSTEM)
   { "sh",       cmd_sh,       2, 2, "<script-path>" },
+#  ifdef CONFIG_SYSTEM_NSH_PROGNAME
+  { CONFIG_SYSTEM_NSH_PROGNAME,
+                cmd_sh,       1, 2, "<script-path>" },
 
 Review comment:
   Yes, this change will forbid run nsh without argument. It's very dangerous because nsh:main
will do some one time initialization by checking whether the argument is empty.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message