diff options
Diffstat (limited to 'src/hci/commands/image_cmd.c')
| -rw-r--r-- | src/hci/commands/image_cmd.c | 72 |
1 files changed, 21 insertions, 51 deletions
diff --git a/src/hci/commands/image_cmd.c b/src/hci/commands/image_cmd.c index bf97b4deb..aaed0ea9b 100644 --- a/src/hci/commands/image_cmd.c +++ b/src/hci/commands/image_cmd.c @@ -22,10 +22,12 @@ */ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); +FILE_SECBOOT ( PERMITTED ); #include <stdint.h> #include <stdlib.h> #include <stdio.h> +#include <string.h> #include <errno.h> #include <getopt.h> #include <ipxe/image.h> @@ -392,54 +394,22 @@ static int imgfree_exec ( int argc, char **argv ) { return imgmulti_exec ( argc, argv, unregister_image ); } -/** Image management commands */ -struct command image_commands[] __command = { - { - .name = "imgfetch", - .exec = imgfetch_exec, - }, - { - .name = "module", - .exec = imgfetch_exec, /* synonym for "imgfetch" */ - }, - { - .name = "initrd", - .exec = imgfetch_exec, /* synonym for "imgfetch" */ - }, - { - .name = "kernel", - .exec = imgselect_exec, /* synonym for "imgselect" */ - }, - { - .name = "chain", - .exec = imgexec_exec, /* synonym for "imgexec" */ - }, - { - .name = "imgselect", - .exec = imgselect_exec, - }, - { - .name = "imgload", - .exec = imgselect_exec, /* synonym for "imgselect" */ - }, - { - .name = "imgargs", - .exec = imgargs_exec, - }, - { - .name = "imgexec", - .exec = imgexec_exec, - }, - { - .name = "boot", /* synonym for "imgexec" */ - .exec = imgexec_exec, - }, - { - .name = "imgstat", - .exec = imgstat_exec, - }, - { - .name = "imgfree", - .exec = imgfree_exec, - }, -}; +/* "imgfetch" and synonyms */ +COMMAND ( imgfetch, imgfetch_exec ); +COMMAND ( module, imgfetch_exec ); +COMMAND ( initrd, imgfetch_exec ); + +/* "imgselect" and synonyms */ +COMMAND ( imgselect, imgselect_exec ); +COMMAND ( imgload, imgselect_exec ); +COMMAND ( kernel, imgselect_exec ); + +/* "imgexec" and synonyms */ +COMMAND ( imgexec, imgexec_exec ); +COMMAND ( chain, imgexec_exec ); +COMMAND ( boot, imgexec_exec ); + +/* Other image management commands */ +COMMAND ( imgargs, imgargs_exec ); +COMMAND ( imgstat, imgstat_exec ); +COMMAND ( imgfree, imgfree_exec ); |
