patacongo commented on code in PR #1788:
URL: https://github.com/apache/nuttx-apps/pull/1788#discussion_r1223765938
##########
nshlib/nsh_console.c:
##########
@@ -63,8 +63,10 @@ static int nsh_consoleioctl(FAR struct nsh_vtbl_s *vtbl,
int cmd, unsigned long arg);
static int nsh_consoleoutput(FAR struct nsh_vtbl_s *vtbl,
FAR const char *fmt, ...) printf_like(2, 3);
+#ifndef CONFIG_DEFAULT_SMALL
static int nsh_erroroutput(FAR struct nsh_vtbl_s *vtbl,
Review Comment:
I would prefer that CONFIG_DEFAULT_SMALL not be used in this manner.
CONFIG_DEFAULT_SMALL is a property of the hardware (or should be), usually
meaning is that the MCU has small memories. Its function is to the choose a
smaller default value for other settings and should not change for a given MCU.
My preference would be that you honor these semantics. I suggest that add a
new configuration like:
config NSH_DISABLE_ERROR_PRINT
bool "Disable NSH Error Printing"
default y if DEFAULT_SMALL
default n if !DEFAULT_SMALL
The option should be selected even if the MCU has CONFIG_DEFAULT_SMALL.
This comment applies to all of the size reduction changes you have made that
uses CONFIG_DEFAULT_SMALL to directly control features. It should not be used
that way.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]