mirror of
https://github.com/ipxe/ipxe
synced 2026-03-16 03:02:07 +03:00
[image] Remove userptr_t from image definition
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -218,7 +218,7 @@ int image_set_cmdline ( struct image *image, const char *cmdline ) {
|
||||
* @ret rc Return status code
|
||||
*/
|
||||
int image_set_len ( struct image *image, size_t len ) {
|
||||
userptr_t new;
|
||||
void *new;
|
||||
|
||||
/* (Re)allocate image data */
|
||||
new = urealloc ( image->data, len );
|
||||
@@ -238,7 +238,7 @@ int image_set_len ( struct image *image, size_t len ) {
|
||||
* @v len Length of image data
|
||||
* @ret rc Return status code
|
||||
*/
|
||||
int image_set_data ( struct image *image, userptr_t data, size_t len ) {
|
||||
int image_set_data ( struct image *image, const void *data, size_t len ) {
|
||||
int rc;
|
||||
|
||||
/* Set image length */
|
||||
@@ -566,7 +566,8 @@ int image_set_trust ( int require_trusted, int permanent ) {
|
||||
* @v len Length
|
||||
* @ret image Image, or NULL on error
|
||||
*/
|
||||
struct image * image_memory ( const char *name, userptr_t data, size_t len ) {
|
||||
struct image * image_memory ( const char *name, const void *data,
|
||||
size_t len ) {
|
||||
struct image *image;
|
||||
int rc;
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ struct image {
|
||||
/** Command line to pass to image */
|
||||
char *cmdline;
|
||||
/** Raw file image */
|
||||
userptr_t data;
|
||||
void *data;
|
||||
/** Length of raw file image */
|
||||
size_t len;
|
||||
|
||||
@@ -191,7 +191,8 @@ extern int image_set_name ( struct image *image, const char *name );
|
||||
extern char * image_strip_suffix ( struct image *image );
|
||||
extern int image_set_cmdline ( struct image *image, const char *cmdline );
|
||||
extern int image_set_len ( struct image *image, size_t len );
|
||||
extern int image_set_data ( struct image *image, userptr_t data, size_t len );
|
||||
extern int image_set_data ( struct image *image, const void *data,
|
||||
size_t len );
|
||||
extern int register_image ( struct image *image );
|
||||
extern void unregister_image ( struct image *image );
|
||||
extern struct image * find_image ( const char *name );
|
||||
@@ -200,7 +201,7 @@ extern int image_exec ( struct image *image );
|
||||
extern int image_replace ( struct image *replacement );
|
||||
extern int image_select ( struct image *image );
|
||||
extern int image_set_trust ( int require_trusted, int permanent );
|
||||
extern struct image * image_memory ( const char *name, userptr_t data,
|
||||
extern struct image * image_memory ( const char *name, const void *data,
|
||||
size_t len );
|
||||
extern const char * image_argument ( struct image *image, const char *key );
|
||||
extern int image_pixbuf ( struct image *image, struct pixel_buffer **pixbuf );
|
||||
|
||||
@@ -18,6 +18,6 @@ extern int imgdownload_string ( const char *uri_string, unsigned long timeout,
|
||||
extern int imgacquire ( const char *name, unsigned long timeout,
|
||||
struct image **image );
|
||||
extern void imgstat ( struct image *image );
|
||||
extern int imgmem ( const char *name, userptr_t data, size_t len );
|
||||
extern int imgmem ( const char *name, const void *data, size_t len );
|
||||
|
||||
#endif /* _USR_IMGMGMT_H */
|
||||
|
||||
@@ -184,7 +184,7 @@ void imgstat ( struct image *image ) {
|
||||
* @v len Length
|
||||
* @ret rc Return status code
|
||||
*/
|
||||
int imgmem ( const char *name, userptr_t data, size_t len ) {
|
||||
int imgmem ( const char *name, const void *data, size_t len ) {
|
||||
struct image *image;
|
||||
|
||||
/* Create image */
|
||||
|
||||
Reference in New Issue
Block a user