davids5 commented on code in PR #8867: URL: https://github.com/apache/nuttx/pull/8867#discussion_r1160127138
########## libs/libc/string/lib_strsignal.c: ########## @@ -22,53 +22,24 @@ * Included Files ****************************************************************************/ +#include <errno.h> #include <signal.h> +#include <stdio.h> #include <string.h> /**************************************************************************** - * Private Data + * Pre-processor Definitions ****************************************************************************/ -/* We don't know what signals names will be assigned to which signals in - * advance and we do not want to return a volatile value. One solution is - * this silly array of useless names: - */ - -static FAR const char *g_default_sigstr[32] = -{ - "Signal 0", - "Signal 1", - "Signal 2", - "Signal 3", - "Signal 4", - "Signal 5", - "Signal 6", - "Signal 7", - "Signal 8", - "Signal 9", - "Signal 10", - "Signal 11", - "Signal 12", - "Signal 13", - "Signal 14", - "Signal 15", - "Signal 16", - "Signal 17", - "Signal 18", - "Signal 19", - "Signal 20", - "Signal 21", - "Signal 22", - "Signal 23", - "Signal 24", - "Signal 25", - "Signal 26", - "Signal 27", - "Signal 28", - "Signal 29", - "Signal 30", - "Signal 31", -}; +#ifdef CONFIG_LIBC_STRSIGNAL_SHORT +# define CASE_SIG_STR(sig, msg) \ Review Comment: I personally do not like glumping a bunch of stuff under DEFAULT_SMALL. (and yes I know you can change it) When we run out of code space the first thing I do is CONFIG_LIBC_STRERROR=n. So my take on this is make it as configurable and small as possible. I think the graduality from 0 code size increase (remove the feature) terse: "sig N" to verbose "Signal Trace/breakpoint trap" is important but who decides what comes in and how much space it should take up in their bin, is ultimately up to the individual configuring the system and we should not force any of it on anyone. Nothing worse then running out of code space, other then then running out of code space on a Friday at 5 pm :) -- 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