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/image/script.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/image') diff --git a/src/image/script.c b/src/image/script.c index 01e38cd6f..257e59a09 100644 --- a/src/image/script.c +++ b/src/image/script.c @@ -352,10 +352,7 @@ static int goto_exec ( int argc, char **argv ) { } /** "goto" command */ -struct command goto_command __command = { - .name = "goto", - .exec = goto_exec, -}; +COMMAND ( goto, goto_exec ); /** "prompt" options */ struct prompt_options { @@ -418,7 +415,4 @@ static int prompt_exec ( int argc, char **argv ) { } /** "prompt" command */ -struct command prompt_command __command = { - .name = "prompt", - .exec = prompt_exec, -}; +COMMAND ( prompt, prompt_exec ); -- cgit v1.2.3-55-g7522