iPXE
|
Image management. More...
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <ipxe/image.h>
#include <ipxe/downloader.h>
#include <ipxe/monojob.h>
#include <ipxe/open.h>
#include <ipxe/uri.h>
#include <usr/imgmgmt.h>
Go to the source code of this file.
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
int | imgdownload (struct uri *uri, unsigned long timeout, struct image **image) |
Download a new image. More... | |
int | imgdownload_string (const char *uri_string, unsigned long timeout, struct image **image) |
Download a new image. More... | |
int | imgacquire (const char *name_uri, unsigned long timeout, struct image **image) |
Acquire an image. More... | |
void | imgstat (struct image *image) |
Display status of an image. More... | |
int | imgmem (const char *name, userptr_t data, size_t len) |
Create image from block of memory. More... | |
Image management.
Definition in file imgmgmt.c.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
Download a new image.
uri | URI |
timeout | Download timeout |
image | Image to fill in |
rc | Return status code |
Definition at line 51 of file imgmgmt.c.
References alloc_image(), create_downloader(), cwuri, uri::efragment, ENOMEM, uri::equery, format_uri_alloc(), free, image_put(), memcpy(), monojob, monojob_wait(), NULL, uri::password, printf(), rc, register_image(), resolve_uri(), strerror(), timeout(), uri_put(), and uri::user.
Referenced by imgdownload_string(), and uriboot().
int imgdownload_string | ( | const char * | uri_string, |
unsigned long | timeout, | ||
struct image ** | image | ||
) |
Download a new image.
uri_string | URI string |
timeout | Download timeout |
image | Image to fill in |
rc | Return status code |
Definition at line 119 of file imgmgmt.c.
References ENOMEM, imgdownload(), parse_uri(), rc, timeout(), and uri_put().
Referenced by comboot_fetch_kernel(), and imgacquire().
int imgacquire | ( | const char * | name_uri, |
unsigned long | timeout, | ||
struct image ** | image | ||
) |
Acquire an image.
name_uri | Name or URI string |
timeout | Download timeout |
image | Image to fill in |
rc | Return status code |
Definition at line 141 of file imgmgmt.c.
References find_image(), imgdownload_string(), and timeout().
Referenced by cert_exec(), console_exec(), digest_exec(), efi_autoexec_filesystem(), efi_autoexec_network(), imgdecrypt_exec(), imgextract_exec(), imgverify_exec(), and shim_exec().
void imgstat | ( | struct image * | image | ) |
Display status of an image.
image | Executable/loadable image |
Definition at line 158 of file imgmgmt.c.
References image::cmdline, image::flags, for_each_table_entry, IMAGE_AUTO_UNREGISTER, IMAGE_HIDDEN, IMAGE_TAGS, IMAGE_TRUSTED, image::len, image::name, image_type::name, printf(), tag, and image::type.
Referenced by imgstat_exec(), and uriboot().
Create image from block of memory.
name | Name |
data | Image data |
len | Length |
rc | Return status code |
Definition at line 187 of file imgmgmt.c.
References data, ENOMEM, image_memory(), len, name, and printf().
Referenced by imgmem_exec().