From 9d4a2ee3538f28a21a77c55c272c84b4e346dd92 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 6 Aug 2025 16:29:32 +0100 Subject: [cmdline] Show commands in alphabetical order Commands were originally ordered by functional group (e.g. keeping the image management commands together), with arrays used to impose a functionally meaningful order within the group. As the number of commands and functional groups has expanded over the years, this has become essentially useless as an organising principle. Switch to sorting commands alphabetically (using the linker table mechanism). Signed-off-by: Michael Brown --- src/hci/shell.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/hci/shell.c') diff --git a/src/hci/shell.c b/src/hci/shell.c index 8ecf73a6f..7e2ecaab6 100644 --- a/src/hci/shell.c +++ b/src/hci/shell.c @@ -72,10 +72,7 @@ static int help_exec ( int argc __unused, char **argv __unused ) { } /** "help" command */ -struct command help_command __command = { - .name = "help", - .exec = help_exec, -}; +COMMAND ( help, help_exec ); /** * Start command shell @@ -137,7 +134,4 @@ static int shell_exec ( int argc, char **argv ) { } /** "shell" command */ -struct command shell_command __command = { - .name = "shell", - .exec = shell_exec, -}; +COMMAND ( shell, shell_exec ); -- cgit v1.2.3-55-g7522