diff --git a/drivers/modem/modem_shell.c b/drivers/modem/modem_shell.c index 505dd9ab8c9..6baf3e48e58 100644 --- a/drivers/modem/modem_shell.c +++ b/drivers/modem/modem_shell.c @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include diff --git a/include/shell/shell.h b/include/shell/legacy_shell.h similarity index 99% rename from include/shell/shell.h rename to include/shell/legacy_shell.h index cb4ff879ecf..4b67038ce7a 100644 --- a/include/shell/shell.h +++ b/include/shell/legacy_shell.h @@ -205,8 +205,8 @@ void shell_register_mcumgr_handler(shell_mcumgr_function_t handler, void *arg); int shell_exec(char *line); /** -* @} -*/ + * @} + */ #ifdef CONFIG_CONSOLE_SHELL diff --git a/samples/drivers/flash_shell/src/main.c b/samples/drivers/flash_shell/src/main.c index a1fe31e37f2..efffadabef0 100644 --- a/samples/drivers/flash_shell/src/main.c +++ b/samples/drivers/flash_shell/src/main.c @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include #include diff --git a/samples/mpu/mpu_test/src/main.c b/samples/mpu/mpu_test/src/main.c index 049e1f5f48a..0ecc428a8a6 100644 --- a/samples/mpu/mpu_test/src/main.c +++ b/samples/mpu/mpu_test/src/main.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include /* Assumption: our devices have less than 64MB of memory */ #define RESERVED_MEM_MAP (CONFIG_SRAM_BASE_ADDRESS + 0x4000000) diff --git a/samples/net/rpl_border_router/src/shell.c b/samples/net/rpl_border_router/src/shell.c index 23cbddbb252..819a125dd6c 100644 --- a/samples/net/rpl_border_router/src/shell.c +++ b/samples/net/rpl_border_router/src/shell.c @@ -11,7 +11,7 @@ #endif #include -#include +#include #include #include "../../../subsys/net/ip/rpl.h" diff --git a/samples/net/syslog_net/src/main.c b/samples/net/syslog_net/src/main.c index 3803258074a..f33d020cd7c 100644 --- a/samples/net/syslog_net/src/main.c +++ b/samples/net/syslog_net/src/main.c @@ -12,7 +12,7 @@ #include -#include +#include #include #include diff --git a/samples/net/wpanusb/src/wpanusb.c b/samples/net/wpanusb/src/wpanusb.c index b4ff68df647..b612221bf53 100644 --- a/samples/net/wpanusb/src/wpanusb.c +++ b/samples/net/wpanusb/src/wpanusb.c @@ -13,7 +13,7 @@ #include #include -#include +#include #include #include diff --git a/samples/net/zperf/src/zperf_shell.c b/samples/net/zperf/src/zperf_shell.c index d9fdbb8f2b4..4ae9c66d70b 100644 --- a/samples/net/zperf/src/zperf_shell.c +++ b/samples/net/zperf/src/zperf_shell.c @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include diff --git a/samples/subsys/shell/shell_module/src/main.c b/samples/subsys/shell/shell_module/src/main.c index a50f9062d08..f3a1f29ab74 100644 --- a/samples/subsys/shell/shell_module/src/main.c +++ b/samples/subsys/shell/shell_module/src/main.c @@ -6,7 +6,7 @@ #include #include -#include +#include #include static int shell_cmd_ping(int argc, char *argv[]) diff --git a/subsys/bluetooth/host/mesh/shell.c b/subsys/bluetooth/host/mesh/shell.c index 47a31952b86..84cda5cbeac 100644 --- a/subsys/bluetooth/host/mesh/shell.c +++ b/subsys/bluetooth/host/mesh/shell.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include diff --git a/subsys/bluetooth/shell/bt.c b/subsys/bluetooth/shell/bt.c index 5c5f45de7ca..3535682c927 100644 --- a/subsys/bluetooth/shell/bt.c +++ b/subsys/bluetooth/shell/bt.c @@ -28,7 +28,7 @@ #include #include -#include +#include #include "bt.h" #include "gatt.h" diff --git a/subsys/bluetooth/shell/flash.c b/subsys/bluetooth/shell/flash.c index e964f2803b4..35415ece433 100644 --- a/subsys/bluetooth/shell/flash.c +++ b/subsys/bluetooth/shell/flash.c @@ -10,7 +10,7 @@ */ #include -#include +#include #include #include diff --git a/subsys/bluetooth/shell/ll.c b/subsys/bluetooth/shell/ll.c index 7b6bab9c318..2f0d680bc3a 100644 --- a/subsys/bluetooth/shell/ll.c +++ b/subsys/bluetooth/shell/ll.c @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include diff --git a/subsys/bluetooth/shell/ticker.c b/subsys/bluetooth/shell/ticker.c index 8d8d49613af..5321cd64695 100644 --- a/subsys/bluetooth/shell/ticker.c +++ b/subsys/bluetooth/shell/ticker.c @@ -10,7 +10,7 @@ */ #include -#include +#include #include #if defined(CONFIG_SOC_FAMILY_NRF) diff --git a/subsys/fs/shell.c b/subsys/fs/shell.c index cd52925ce93..c4a01a7043b 100644 --- a/subsys/fs/shell.c +++ b/subsys/fs/shell.c @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include #include diff --git a/subsys/mgmt/smp_shell.c b/subsys/mgmt/smp_shell.c index e619fa3da1a..583431c7dbe 100644 --- a/subsys/mgmt/smp_shell.c +++ b/subsys/mgmt/smp_shell.c @@ -12,7 +12,7 @@ #include #include #include "net/buf.h" -#include "shell/shell.h" +#include "shell/legacy_shell.h" #include "mgmt/mgmt.h" #include "mgmt/serial.h" #include "mgmt/buf.h" diff --git a/subsys/net/ip/net_shell.c b/subsys/net/ip/net_shell.c index 4e160f7a9c4..e2befb25081 100644 --- a/subsys/net/ip/net_shell.c +++ b/subsys/net/ip/net_shell.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include diff --git a/subsys/net/l2/bluetooth/bluetooth_shell.c b/subsys/net/l2/bluetooth/bluetooth_shell.c index 716f8e6fc0e..339a52b8538 100644 --- a/subsys/net/l2/bluetooth/bluetooth_shell.c +++ b/subsys/net/l2/bluetooth/bluetooth_shell.c @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include diff --git a/subsys/net/l2/ieee802154/ieee802154_shell.c b/subsys/net/l2/ieee802154/ieee802154_shell.c index 02091428fd1..ca4fed563be 100644 --- a/subsys/net/l2/ieee802154/ieee802154_shell.c +++ b/subsys/net/l2/ieee802154/ieee802154_shell.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include diff --git a/subsys/net/l2/wifi/wifi_shell.c b/subsys/net/l2/wifi/wifi_shell.c index e6f578bcb05..927aa16ab1b 100644 --- a/subsys/net/l2/wifi/wifi_shell.c +++ b/subsys/net/l2/wifi/wifi_shell.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include diff --git a/subsys/net/lib/openthread/platform/shell.c b/subsys/net/lib/openthread/platform/shell.c index 1cfccc3f298..71ecd0765b9 100644 --- a/subsys/net/lib/openthread/platform/shell.c +++ b/subsys/net/lib/openthread/platform/shell.c @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include diff --git a/subsys/shell/CMakeLists.txt b/subsys/shell/CMakeLists.txt index 6d629475a50..4137203e52a 100644 --- a/subsys/shell/CMakeLists.txt +++ b/subsys/shell/CMakeLists.txt @@ -4,7 +4,7 @@ zephyr_include_directories_ifdef(CONFIG_CONSOLE_SHELL zephyr_sources( shell_service.c - shell.c + legacy_shell.c ) add_subdirectory(modules) diff --git a/subsys/shell/shell.c b/subsys/shell/legacy_shell.c similarity index 97% rename from subsys/shell/shell.c rename to subsys/shell/legacy_shell.c index 32c95843868..8fcd2f8bdc7 100644 --- a/subsys/shell/shell.c +++ b/subsys/shell/legacy_shell.c @@ -20,7 +20,7 @@ #include #include "mgmt/serial.h" -#include +#include #if defined(CONFIG_NATIVE_POSIX_CONSOLE) #include "drivers/console/native_posix_console.h" @@ -244,19 +244,16 @@ static int cmd_help(int argc, char *argv[]) cmd = get_standalone(cmd_str); if (cmd) { return show_cmd_help(cmd, true); - } else { - printk("No help found for '%s'\n", cmd_str); - return -EINVAL; - } - } else { - cmd = get_module_cmd(module, cmd_str); - if (cmd) { - return show_cmd_help(cmd, true); - } else { - printk("Unknown command '%s'\n", cmd_str); - return -EINVAL; } + printk("No help found for '%s'\n", cmd_str); + return -EINVAL; } + cmd = get_module_cmd(module, cmd_str); + if (cmd) { + return show_cmd_help(cmd, true); + } + printk("Unknown command '%s'\n", cmd_str); + return -EINVAL; } module_help: diff --git a/subsys/shell/modules/kernel_service.c b/subsys/shell/modules/kernel_service.c index 52a5c47a9b0..876188c0a50 100644 --- a/subsys/shell/modules/kernel_service.c +++ b/subsys/shell/modules/kernel_service.c @@ -5,7 +5,7 @@ */ #include -#include +#include #include #include #include diff --git a/subsys/shell/shell_service.c b/subsys/shell/shell_service.c index be5f3c6b1ec..0b6e2f8f708 100644 --- a/subsys/shell/shell_service.c +++ b/subsys/shell/shell_service.c @@ -13,7 +13,7 @@ */ #include -#include +#include #include #define SHELL_PROMPT "shell> " diff --git a/tests/bluetooth/mesh_shell/src/main.c b/tests/bluetooth/mesh_shell/src/main.c index 3eb50cfd155..0ccb669f901 100644 --- a/tests/bluetooth/mesh_shell/src/main.c +++ b/tests/bluetooth/mesh_shell/src/main.c @@ -11,7 +11,7 @@ #include #include -#include +#include void main(void) { diff --git a/tests/bluetooth/shell/src/main.c b/tests/bluetooth/shell/src/main.c index 93c9eb8b6b3..7a68fb1354d 100644 --- a/tests/bluetooth/shell/src/main.c +++ b/tests/bluetooth/shell/src/main.c @@ -21,7 +21,7 @@ #include #include -#include +#include #include diff --git a/tests/include/tc_util.h b/tests/include/tc_util.h index 835ad8db9fb..de34e1622e0 100644 --- a/tests/include/tc_util.h +++ b/tests/include/tc_util.h @@ -12,7 +12,7 @@ #include #include -#include +#include #if defined(CONFIG_STDOUT_CONSOLE) #include diff --git a/tests/shell/src/main.c b/tests/shell/src/main.c index ddc4a5dbba0..9c859ad265c 100644 --- a/tests/shell/src/main.c +++ b/tests/shell/src/main.c @@ -12,7 +12,7 @@ #include #include -#include +#include static void test_shell_exec(const char *line, int result) {