This is an automated email from the ASF dual-hosted git repository.
jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
The following commit(s) were added to refs/heads/master by this push:
new 041d6e777 sys/shell: Fix help and select commands
041d6e777 is described below
commit 041d6e7776e1d687928a6607e0e56223d7f854e3
Author: Jerzy Kasenberg <[email protected]>
AuthorDate: Thu Jul 24 20:59:34 2025 +0200
sys/shell: Fix help and select commands
When static linking of shell commands was introduced,
standard 'help' and 'select' commands were no longer
marked as extended (using streamer).
This resulted in both of them crashing system with
NULL pointer dereference.
Now it's corrected by calling correct macros for
creation of those commands.
Signed-off-by: Jerzy Kasenberg <[email protected]>
---
sys/shell/src/shell.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sys/shell/src/shell.c b/sys/shell/src/shell.c
index 8de736c35..91f5d5b28 100644
--- a/sys/shell/src/shell.c
+++ b/sys/shell/src/shell.c
@@ -401,7 +401,7 @@ show_help(const struct shell_cmd *cmd, int argc, char
*argv[],
return 0;
}
-MAKE_SHELL_CMD(help, show_help, NULL)
+MAKE_SHELL_EXT_CMD(help, show_help, NULL)
static int
set_default_module(const char *name)
@@ -432,7 +432,7 @@ select_module(const struct shell_cmd *cmd, int argc, char
*argv[],
return 0;
}
-MAKE_SHELL_CMD(select, select_module, NULL)
+MAKE_SHELL_EXT_CMD(select, select_module, NULL)
static const struct shell_cmd *
shell_find_cmd(int argc, char *argv[], struct streamer *streamer)