iPXE
|
Image management commands. More...
#include <stdint.h>
#include <stdlib.h>
#include <stdio.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) | |
static int | imgsingle_exec (int argc, char **argv, struct imgsingle_descriptor *desc) |
The "img{single}" family of commands. More... | |
static int | imgfetch_exec (int argc, char **argv) |
The "imgfetch" command. More... | |
static int | imgselect (struct image *image, struct imgsingle_options *opts __unused) |
"imgselect" command action More... | |
static int | imgselect_exec (int argc, char **argv) |
The "imgselect" command. More... | |
static int | imgexec (struct image *image, struct imgsingle_options *opts) |
"imgexec" command action More... | |
static int | imgexec_exec (int argc, char **argv) |
The "imgexec" command. More... | |
static int | imgargs_exec (int argc, char **argv) |
The "imgargs" command body. More... | |
static int | imgmulti_exec (int argc, char **argv, void(*payload)(struct image *image)) |
The "img{multi}" family of commands. More... | |
static int | imgstat_exec (int argc, char **argv) |
The "imgstat" command. More... | |
static int | imgfree_exec (int argc, char **argv) |
The "imgfree" command. More... | |
Variables | |
union { | |
struct option_descriptor imgexec [4] | |
struct option_descriptor imgsingle [3] | |
} | opts |
"img{single}" option list More... | |
static struct command_descriptor | imgfetch_cmd |
"imgfetch" command descriptor More... | |
struct imgsingle_descriptor | imgfetch_desc |
"imgfetch" family command descriptor More... | |
static struct command_descriptor | imgselect_cmd |
"imgselect" command descriptor More... | |
struct imgsingle_descriptor | imgselect_desc |
"imgselect" family command descriptor More... | |
static struct command_descriptor | imgexec_cmd |
"imgexec" command descriptor More... | |
struct imgsingle_descriptor | imgexec_desc |
"imgexec" family command descriptor More... | |
static struct command_descriptor | imgargs_cmd |
"imgargs" command descriptor More... | |
struct imgsingle_descriptor | imgargs_desc |
"imgargs" family command descriptor More... | |
static struct option_descriptor | imgmulti_opts [] = {} |
"img{multi}" option list More... | |
static struct command_descriptor | imgmulti_cmd |
"img{multi}" command descriptor More... | |
struct command image_commands [] | __command |
Image management commands. More... | |
Image management commands.
Definition in file image_cmd.c.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
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 102 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 205 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 216 of file image_cmd.c.
References image_select().
|
static |
The "imgselect" command.
argc | Argument count |
argv | Argument list |
rc | Return status code |
Definition at line 241 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 257 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 295 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 318 of file image_cmd.c.
References imgargs_desc, and imgsingle_exec().
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 341 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 380 of file image_cmd.c.
References imgmulti_exec(), and imgstat().
|
static |
The "imgfree" command.
argc | Argument count |
argv | Argument list |
rc | Return status code |
Definition at line 391 of file image_cmd.c.
References imgmulti_exec(), and unregister_image().
struct option_descriptor imgexec[4] |
Definition at line 58 of file image_cmd.c.
struct option_descriptor imgsingle[3] |
Definition at line 62 of file image_cmd.c.
union { ... } opts |
"img{single}" option list
Referenced by imgexec(), imgmulti_exec(), and imgsingle_exec().
|
static |
"imgfetch" command descriptor
Definition at line 188 of file image_cmd.c.
struct imgsingle_descriptor imgfetch_desc |
"imgfetch" family command descriptor
Definition at line 193 of file image_cmd.c.
Referenced by imgfetch_exec().
|
static |
"imgselect" command descriptor
Definition at line 222 of file image_cmd.c.
struct imgsingle_descriptor imgselect_desc |
"imgselect" family command descriptor
Definition at line 227 of file image_cmd.c.
Referenced by imgselect_exec().
|
static |
"imgexec" command descriptor
Definition at line 246 of file image_cmd.c.
struct imgsingle_descriptor imgexec_desc |
"imgexec" family command descriptor
Definition at line 281 of file image_cmd.c.
Referenced by imgexec_exec().
|
static |
"imgargs" command descriptor
Definition at line 300 of file image_cmd.c.
struct imgsingle_descriptor imgargs_desc |
"imgargs" family command descriptor
Definition at line 305 of file image_cmd.c.
Referenced by imgargs_exec().
|
static |
"img{multi}" option list
Definition at line 326 of file image_cmd.c.
|
static |
"img{multi}" command descriptor
Definition at line 329 of file image_cmd.c.
Referenced by imgmulti_exec().
struct command image_commands [] __command |
Image management commands.
Definition at line 396 of file image_cmd.c.