You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/10/15 09:02:22 UTC

[GitHub] [incubator-nuttx-apps] xiaoxiang781216 opened a new pull request, #1350: Refine nshlib implementation

xiaoxiang781216 opened a new pull request, #1350:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1350

   ## Summary
   
   - nshlib: Call nsh_sysinitscript in usb or alt console like normal one
   - nshlib: Call nsh_telnetstart in nsh_initialize to avoid the dupliation
   
   ## Impact
   nshlib
   
   ## Testing
   sim:nsh
   


-- 
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-unsubscribe@nuttx.apache.org

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


[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a diff in pull request #1350: Refine nshlib implementation

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #1350:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1350#discussion_r996431512


##########
nshlib/nsh_init.c:
##########
@@ -66,25 +100,86 @@ static const struct extmatch_vtable_s g_nsh_extmatch =
 
 void nsh_initialize(void)
 {
+#if defined (CONFIG_SYSTEM_NSH_SYMTAB)
+  struct boardioc_symtab_s symdesc;
+#endif
+#if defined(CONFIG_NSH_ROMFSETC) && !defined(CONFIG_NSH_DISABLESCRIPT)
+  FAR struct console_stdio_s *pstate;
+#endif
+
 #if defined(CONFIG_NSH_READLINE) && defined(CONFIG_READLINE_TABCOMPLETION)
   /* Configure the NSH prompt */
 
   readline_prompt(g_nshprompt);
 
-#ifdef CONFIG_READLINE_HAVE_EXTMATCH
+#  ifdef CONFIG_READLINE_HAVE_EXTMATCH
   /* Set up for tab completion on NSH commands */
 
   readline_extmatch(&g_nsh_extmatch);
-#endif
+#  endif
 #endif
 
   /* Mount the /etc filesystem */
 
   (void)nsh_romfsetc();
 
+#ifdef CONFIG_NSH_USBDEV_TRACE
+  /* Initialize any USB tracing options that were requested */
+
+  usbtrace_enable(TRACE_BITSET);
+#endif
+
+#if defined(CONFIG_SYSTEM_NSH_SYMTAB)
+  /* Make sure that we are using our symbol table */
+
+  symdesc.symtab   = (FAR struct symtab_s *)CONFIG_SYSTEM_NSH_SYMTAB_ARRAYNAME; /* Discard 'const' */

Review Comment:
   There are many cases which append the short comment at the end, so it's better to keep as it.



-- 
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-unsubscribe@nuttx.apache.org

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


[GitHub] [incubator-nuttx-apps] hartmannathan commented on pull request #1350: Refine nshlib implementation

Posted by GitBox <gi...@apache.org>.
hartmannathan commented on PR #1350:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1350#issuecomment-1279966351

   > Will nsh over telnet still work?
   > 
   > (I use nsh over telnet on some boards that lack serial ports.)
   
   Ah, nevermind, I see the where the call to `nsh_telnetstart` is done now. I didn't see that a moment ago.


-- 
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-unsubscribe@nuttx.apache.org

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


[GitHub] [incubator-nuttx-apps] hartmannathan commented on pull request #1350: Refine nshlib implementation

Posted by GitBox <gi...@apache.org>.
hartmannathan commented on PR #1350:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1350#issuecomment-1280040024

   > @hartmannathan please merge if you are fine with this changes
   
   Done. Thanks!


-- 
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-unsubscribe@nuttx.apache.org

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


[GitHub] [incubator-nuttx-apps] masayuki2009 commented on pull request #1350: Refine nshlib implementation

Posted by GitBox <gi...@apache.org>.
masayuki2009 commented on PR #1350:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1350#issuecomment-1279762881

   @xiaoxiang781216 
   Please rebase this PR to the latest master.
   


-- 
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-unsubscribe@nuttx.apache.org

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


[GitHub] [incubator-nuttx-apps] pkarashchenko commented on a diff in pull request #1350: Refine nshlib implementation

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #1350:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1350#discussion_r996417951


##########
nshlib/nsh_init.c:
##########
@@ -66,25 +100,86 @@ static const struct extmatch_vtable_s g_nsh_extmatch =
 
 void nsh_initialize(void)
 {
+#if defined (CONFIG_SYSTEM_NSH_SYMTAB)
+  struct boardioc_symtab_s symdesc;
+#endif
+#if defined(CONFIG_NSH_ROMFSETC) && !defined(CONFIG_NSH_DISABLESCRIPT)
+  FAR struct console_stdio_s *pstate;
+#endif
+
 #if defined(CONFIG_NSH_READLINE) && defined(CONFIG_READLINE_TABCOMPLETION)
   /* Configure the NSH prompt */
 
   readline_prompt(g_nshprompt);
 
-#ifdef CONFIG_READLINE_HAVE_EXTMATCH
+#  ifdef CONFIG_READLINE_HAVE_EXTMATCH
   /* Set up for tab completion on NSH commands */
 
   readline_extmatch(&g_nsh_extmatch);
-#endif
+#  endif
 #endif
 
   /* Mount the /etc filesystem */
 
   (void)nsh_romfsetc();
 
+#ifdef CONFIG_NSH_USBDEV_TRACE
+  /* Initialize any USB tracing options that were requested */
+
+  usbtrace_enable(TRACE_BITSET);
+#endif
+
+#if defined(CONFIG_SYSTEM_NSH_SYMTAB)
+  /* Make sure that we are using our symbol table */
+
+  symdesc.symtab   = (FAR struct symtab_s *)CONFIG_SYSTEM_NSH_SYMTAB_ARRAYNAME; /* Discard 'const' */

Review Comment:
   should a comment be on a separate line?



-- 
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-unsubscribe@nuttx.apache.org

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


[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on pull request #1350: Refine nshlib implementation

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #1350:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1350#issuecomment-1279769726

   > @xiaoxiang781216 Please rebase this PR to the latest master.
   
   Done.


-- 
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-unsubscribe@nuttx.apache.org

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


[GitHub] [incubator-nuttx-apps] pkarashchenko commented on pull request #1350: Refine nshlib implementation

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on PR #1350:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1350#issuecomment-1280010106

   @hartmannathan please merge if you are fine with this changes


-- 
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-unsubscribe@nuttx.apache.org

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


[GitHub] [incubator-nuttx-apps] hartmannathan merged pull request #1350: Refine nshlib implementation

Posted by GitBox <gi...@apache.org>.
hartmannathan merged PR #1350:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1350


-- 
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-unsubscribe@nuttx.apache.org

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