xiaoxiang781216 commented on code in PR #2918: URL: https://github.com/apache/nuttx-apps/pull/2918#discussion_r1899979968
########## nshlib/nsh.h: ########## @@ -380,7 +380,7 @@ /* Maximum size of one command line (telnet or serial) */ #ifndef CONFIG_NSH_LINELEN Review Comment: let's remove CONFIG_NSH_LINELEN directly ########## nshlib/nsh_console.h: ########## @@ -157,6 +157,14 @@ struct nsh_vtbl_s char traceline[CONFIG_NSH_LINELEN]; #endif + /* Temporary line buffer */ + +#if (!defined(CONFIG_NSH_DISABLE_MEMDUMP) && defined(NSH_HAVE_WRITEFILE)) || \ + !defined(CONFIG_NSH_DISABLEBG) || defined(CONFIG_NSH_PIPELINE) || \ + !defined(CONFIG_NSH_DISABLE_WATCH) + char templine[CONFIG_NSH_LINELEN]; Review Comment: the temp buffer is only used in few command, why move it to nsh_vtbl to extend the life to the whole session? ########## nshlib/nsh_console.h: ########## @@ -151,6 +151,12 @@ struct nsh_vtbl_s bool isctty; + /* Trace line buffer */ + +#ifdef CONFIG_SCHED_INSTRUMENTATION_DUMP + char traceline[CONFIG_NSH_LINELEN]; Review Comment: but traceline is used only when launching program, isn't good to keep the buffer in the whole nsh life cycle -- 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