david/ipxe
Archived
1
0
This repository has been archived on 2020-12-06. You can view files and clone it, but cannot push or open issues or pull requests.
ipxe/src/include/usr/imgmgmt.h

52 lines
1.0 KiB
C
Raw Normal View History

#ifndef _USR_IMGMGMT_H
#define _USR_IMGMGMT_H
/** @file
*
* Image management
*
*/
FILE_LICENCE ( GPL2_OR_LATER );
#include <ipxe/image.h>
2007-01-12 11:07:56 +01:00
extern int imgdownload ( struct uri *uri, const char *name, const char *cmdline,
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 );
/**
* Select an image for execution
*
* @v image Image
* @ret rc Return status code
*/
static inline int imgselect ( struct image *image ) {
return image_select ( image );
}
/**
* Find the previously-selected image
*
* @ret image Image, or NULL
*/
static inline struct image * imgautoselect ( void ) {
return image_find_selected();
}
/**
* Execute an image
*
* @v image Image
* @ret rc Return status code
*/
static inline int imgexec ( struct image *image ) {
return image_exec ( image );
}
#endif /* _USR_IMGMGMT_H */