mirror of
https://github.com/ipxe/ipxe
synced 2025-12-23 05:21:49 +03:00
[image] Simplify use of imgdownload()
Allow imgdownload() to be called without first having to allocate (and so keep track of) an image. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -58,8 +58,11 @@ struct image {
|
||||
struct image *replacement;
|
||||
};
|
||||
|
||||
/** Image is registered */
|
||||
#define IMAGE_REGISTERED 0x00001
|
||||
|
||||
/** Image is selected for execution */
|
||||
#define IMAGE_SELECTED 0x0001
|
||||
#define IMAGE_SELECTED 0x0002
|
||||
|
||||
/** An executable image type */
|
||||
struct image_type {
|
||||
@@ -142,6 +145,7 @@ extern void unregister_image ( struct image *image );
|
||||
struct image * find_image ( const char *name );
|
||||
extern int image_probe ( struct image *image );
|
||||
extern int image_exec ( struct image *image );
|
||||
extern int image_replace ( struct image *replacement );
|
||||
extern int image_select ( struct image *image );
|
||||
extern struct image * image_find_selected ( void );
|
||||
|
||||
|
||||
@@ -11,12 +11,16 @@ FILE_LICENCE ( GPL2_OR_LATER );
|
||||
|
||||
#include <ipxe/image.h>
|
||||
|
||||
extern int register_and_put_image ( struct image *image );
|
||||
extern int register_and_probe_image ( struct image *image );
|
||||
extern int register_and_select_image ( struct image *image );
|
||||
extern int register_and_boot_image ( struct image *image );
|
||||
extern int imgdownload ( struct image *image, struct uri *uri,
|
||||
extern int register_and_replace_image ( struct image *image );
|
||||
extern int imgdownload ( struct uri *uri, const char *name, const char *cmdline,
|
||||
int ( * action ) ( struct image *image ) );
|
||||
extern int imgfetch ( struct image *image, const char *uri_string,
|
||||
int ( * action ) ( struct image *image ) );
|
||||
extern int imgdownload_string ( const char *uri_string, const char *name,
|
||||
const char *cmdline,
|
||||
int ( * action ) ( struct image *image ) );
|
||||
extern void imgstat ( struct image *image );
|
||||
extern void imgfree ( struct image *image );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user