|
iPXE
|
Image management commands. More...
#include <stdint.h>#include <stdlib.h>#include <stdio.h>#include <string.h>#include <errno.h>#include <getopt.h>#include <ipxe/image.h>#include <ipxe/command.h>#include <ipxe/parseopt.h>#include <ipxe/shell.h>#include <usr/imgmgmt.h>Go to the source code of this file.
Data Structures | |
| struct | imgsingle_options |
| "img{single}" options More... | |
| struct | imgsingle_descriptor |
| An "img{single}" family command descriptor. More... | |
| struct | imgmulti_options |
| "img{multi}" options More... | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| FILE_SECBOOT (PERMITTED) | |
| static int | imgsingle_exec (int argc, char **argv, struct imgsingle_descriptor *desc) |
| The "img{single}" family of commands. | |
| static int | imgfetch_exec (int argc, char **argv) |
| The "imgfetch" command. | |
| static int | imgselect (struct image *image, struct imgsingle_options *opts __unused) |
| "imgselect" command action | |
| static int | imgselect_exec (int argc, char **argv) |
| The "imgselect" command. | |
| static int | imgexec (struct image *image, struct imgsingle_options *opts) |
| "imgexec" command action | |
| static int | imgexec_exec (int argc, char **argv) |
| The "imgexec" command. | |
| static int | imgargs_exec (int argc, char **argv) |
| The "imgargs" command body. | |
| static int | imgmulti_exec (int argc, char **argv, void(*payload)(struct image *image)) |
| The "img{multi}" family of commands. | |
| static int | imgstat_exec (int argc, char **argv) |
| The "imgstat" command. | |
| static int | imgfree_exec (int argc, char **argv) |
| The "imgfree" command. | |
| COMMAND (imgfetch, imgfetch_exec) | |
| COMMAND (module, imgfetch_exec) | |
| COMMAND (initrd, imgfetch_exec) | |
| COMMAND (imgselect, imgselect_exec) | |
| COMMAND (imgload, imgselect_exec) | |
| COMMAND (kernel, imgselect_exec) | |
| COMMAND (imgexec, imgexec_exec) | |
| COMMAND (chain, imgexec_exec) | |
| COMMAND (boot, imgexec_exec) | |
| COMMAND (imgargs, imgargs_exec) | |
| COMMAND (imgstat, imgstat_exec) | |
| COMMAND (imgfree, imgfree_exec) | |
Variables | |
| union { | |
| struct option_descriptor imgexec [4] | |
| struct option_descriptor imgsingle [3] | |
| } | opts |
| "img{single}" option list | |
| static struct command_descriptor | imgfetch_cmd |
| "imgfetch" command descriptor | |
| struct imgsingle_descriptor | imgfetch_desc |
| "imgfetch" family command descriptor | |
| static struct command_descriptor | imgselect_cmd |
| "imgselect" command descriptor | |
| struct imgsingle_descriptor | imgselect_desc |
| "imgselect" family command descriptor | |
| static struct command_descriptor | imgexec_cmd |
| "imgexec" command descriptor | |
| struct imgsingle_descriptor | imgexec_desc |
| "imgexec" family command descriptor | |
| static struct command_descriptor | imgargs_cmd |
| "imgargs" command descriptor | |
| struct imgsingle_descriptor | imgargs_desc |
| "imgargs" family command descriptor | |
| static struct option_descriptor | imgmulti_opts [] = {} |
| "img{multi}" option list | |
| static struct command_descriptor | imgmulti_cmd |
| "img{multi}" command descriptor | |
Image management commands.
Definition in file image_cmd.c.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| FILE_SECBOOT | ( | PERMITTED | ) |
|
static |
The "img{single}" family of commands.
| argc | Argument count |
| argv | Argument list |
| desc | "img{single}" command descriptor |
| action_name | Action name (for error messages) |
| action | Action to take upon image |
| rc | Return status code |
Definition at line 104 of file image_cmd.c.
References cmdline, concat_args(), desc, ENOMEM, find_image_tag(), image::flags, free, IMAGE_AUTO_UNREGISTER, image_set_cmdline(), image_set_name(), NULL, optind, opts, parse_options(), printf(), rc, selected_image, and strerror().
Referenced by imgargs_exec(), imgexec_exec(), imgfetch_exec(), and imgselect_exec().
|
static |
The "imgfetch" command.
| argc | Argument count |
| argv | Argument list |
| rc | Return status code |
Definition at line 207 of file image_cmd.c.
References imgfetch_desc, and imgsingle_exec().
|
static |
"imgselect" command action
| image | Image |
| opts | Options |
| rc | Return status code |
Definition at line 218 of file image_cmd.c.
References __unused, image_select(), and opts.
Referenced by COMMAND().
|
static |
The "imgselect" command.
| argc | Argument count |
| argv | Argument list |
| rc | Return status code |
Definition at line 243 of file image_cmd.c.
References imgselect_desc, and imgsingle_exec().
|
static |
"imgexec" command action
| image | Image |
| opts | Options |
| rc | Return status code |
Definition at line 259 of file image_cmd.c.
References image_exec(), image_replace(), opts, rc, shell_stop(), and SHELL_STOP_COMMAND_SEQUENCE.
|
static |
The "imgexec" command.
| argc | Argument count |
| argv | Argument list |
| rc | Return status code |
Definition at line 297 of file image_cmd.c.
References imgexec_desc, and imgsingle_exec().
|
static |
The "imgargs" command body.
| argc | Argument count |
| argv | Argument list |
| rc | Return status code |
Definition at line 320 of file image_cmd.c.
References imgargs_desc, and imgsingle_exec().
Referenced by COMMAND().
The "img{multi}" family of commands.
| argc | Argument count |
| argv | Argument list |
| payload | Function to execute on each image |
| rc | Return status code |
Definition at line 343 of file image_cmd.c.
References ENOENT, find_image(), for_each_image_safe, imgmulti_cmd, optind, opts, parse_options(), printf(), rc, and tmp.
Referenced by imgfree_exec(), and imgstat_exec().
|
static |
The "imgstat" command.
| argc | Argument count |
| argv | Argument list |
| rc | Return status code |
Definition at line 382 of file image_cmd.c.
References imgmulti_exec(), and imgstat().
Referenced by COMMAND().
|
static |
The "imgfree" command.
| argc | Argument count |
| argv | Argument list |
| rc | Return status code |
Definition at line 393 of file image_cmd.c.
References imgmulti_exec(), and unregister_image().
Referenced by COMMAND().
| COMMAND | ( | imgfetch | , |
| imgfetch_exec | ) |
References imgfetch_exec().
| COMMAND | ( | module | , |
| imgfetch_exec | ) |
References imgfetch_exec().
| COMMAND | ( | initrd | , |
| imgfetch_exec | ) |
References imgfetch_exec().
| COMMAND | ( | imgselect | , |
| imgselect_exec | ) |
References imgselect(), and imgselect_exec().
| COMMAND | ( | imgload | , |
| imgselect_exec | ) |
References imgselect_exec().
| COMMAND | ( | kernel | , |
| imgselect_exec | ) |
References imgselect_exec(), and kernel.
| COMMAND | ( | imgexec | , |
| imgexec_exec | ) |
References imgexec, and imgexec_exec().
| COMMAND | ( | chain | , |
| imgexec_exec | ) |
References imgexec_exec().
| COMMAND | ( | boot | , |
| imgexec_exec | ) |
References imgexec_exec().
| COMMAND | ( | imgargs | , |
| imgargs_exec | ) |
References imgargs_exec().
| COMMAND | ( | imgstat | , |
| imgstat_exec | ) |
References imgstat(), and imgstat_exec().
| COMMAND | ( | imgfree | , |
| imgfree_exec | ) |
References imgfree_exec().
| struct option_descriptor imgexec[4] |
Definition at line 60 of file image_cmd.c.
Referenced by COMMAND().
| struct option_descriptor imgsingle[3] |
Definition at line 64 of file image_cmd.c.
| union { ... } opts |
"img{single}" option list
|
static |
"imgfetch" command descriptor
Definition at line 190 of file image_cmd.c.
| struct imgsingle_descriptor imgfetch_desc |
"imgfetch" family command descriptor
Definition at line 195 of file image_cmd.c.
Referenced by imgfetch_exec().
|
static |
"imgselect" command descriptor
Definition at line 224 of file image_cmd.c.
| struct imgsingle_descriptor imgselect_desc |
"imgselect" family command descriptor
Definition at line 229 of file image_cmd.c.
Referenced by imgselect_exec().
|
static |
"imgexec" command descriptor
Definition at line 248 of file image_cmd.c.
| struct imgsingle_descriptor imgexec_desc |
"imgexec" family command descriptor
Definition at line 283 of file image_cmd.c.
Referenced by imgexec_exec().
|
static |
"imgargs" command descriptor
Definition at line 302 of file image_cmd.c.
| struct imgsingle_descriptor imgargs_desc |
"imgargs" family command descriptor
Definition at line 307 of file image_cmd.c.
Referenced by imgargs_exec().
|
static |
|
static |
"img{multi}" command descriptor
Definition at line 331 of file image_cmd.c.
Referenced by imgmulti_exec().