shell: Modify subcommands to use SHELL_STATIC_SUBCMD_SET_CREATE

It is planned to deprecate SHELL_CREATE_STATIC_SUBCMD_SET macro
which is replaced by SHELL_STATIC_SUBCMD_SET_CREATE.

Additionally, removed irrelevant comments about alphabetical
ordering which is no longer needed.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
Krzysztof Chruscinski 2019-02-13 14:53:29 +01:00 committed by Anas Nashif
commit 3605e48c44
29 changed files with 106 additions and 153 deletions

View file

@ -142,18 +142,14 @@ static int cmd_kernel_reboot_cold(const struct shell *shell,
return 0;
}
SHELL_CREATE_STATIC_SUBCMD_SET(sub_kernel_reboot)
{
/* Alphabetically sorted. */
SHELL_STATIC_SUBCMD_SET_CREATE(sub_kernel_reboot,
SHELL_CMD(cold, NULL, "Cold reboot.", cmd_kernel_reboot_cold),
SHELL_CMD(warm, NULL, "Warm reboot.", cmd_kernel_reboot_warm),
SHELL_SUBCMD_SET_END /* Array terminated. */
};
);
#endif
SHELL_CREATE_STATIC_SUBCMD_SET(sub_kernel)
{
/* Alphabetically sorted. */
SHELL_STATIC_SUBCMD_SET_CREATE(sub_kernel,
SHELL_CMD(cycles, NULL, "Kernel cycles.", cmd_kernel_cycles),
#if defined(CONFIG_REBOOT)
SHELL_CMD(reboot, &sub_kernel_reboot, "Reboot.", NULL),
@ -166,6 +162,6 @@ SHELL_CREATE_STATIC_SUBCMD_SET(sub_kernel)
SHELL_CMD(uptime, NULL, "Kernel uptime.", cmd_kernel_uptime),
SHELL_CMD(version, NULL, "Kernel version.", cmd_kernel_version),
SHELL_SUBCMD_SET_END /* Array terminated. */
};
);
SHELL_CMD_REGISTER(kernel, &sub_kernel, "Kernel commands", NULL);