summaryrefslogtreecommitdiffstats
path: root/src/hci/commands/image_cmd.c
diff options
context:
space:
mode:
authorSimon Rettberg2026-01-28 12:53:53 +0100
committerSimon Rettberg2026-01-28 12:53:53 +0100
commit8e82785c584dc13e20f9229decb95bd17bbe9cd1 (patch)
treea8b359e59196be5b2e3862bed189107f4bc9975f /src/hci/commands/image_cmd.c
parentMerge branch 'master' into openslx (diff)
parent[prefix] Make unlzma.S compatible with 386 class CPUs (diff)
downloadipxe-openslx.tar.gz
ipxe-openslx.tar.xz
ipxe-openslx.zip
Merge branch 'master' into openslxopenslx
Diffstat (limited to 'src/hci/commands/image_cmd.c')
-rw-r--r--src/hci/commands/image_cmd.c72
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 );