]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[image] Remove userptr_t from image definition
authorMichael Brown <mcb30@ipxe.org>
Tue, 22 Apr 2025 11:20:26 +0000 (12:20 +0100)
committerMichael Brown <mcb30@ipxe.org>
Tue, 22 Apr 2025 11:21:26 +0000 (12:21 +0100)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/core/image.c
src/include/ipxe/image.h
src/include/usr/imgmgmt.h
src/usr/imgmgmt.c

index e90d82ffbe9fa86d249a162236072dc050d1f1e4..a49ca7e1d3325fa4c82732ac9ae92b663fbd2d8f 100644 (file)
@@ -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;
 
index ca383dc7b38979c40e2e8d6b05e1701ac2ec33c5..bf2d77626bef4356cb2de8155a73d235d8045f03 100644 (file)
@@ -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 );
index 14fb7cbc6147e32a5d33cb6a4cc1bd5ef998e05d..506c3eb14ecfd2e4e21deab36f0dbf4dadc8f4d0 100644 (file)
@@ -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 */
index 92bf236f9b6668efc4b115ce135ee0e63c82bc81..054137696653fb70246b6afc9e394e0ff808f404 100644 (file)
@@ -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 */