The ::unload field is a function pointer, so it should be u32 for 32-bit, u64 for 64-bit. Add a prototype for it in the native efi_loaded_image_t type. Also change type of parent_handle and device_handle from void * to efi_handle_t for documentation purposes. The unload method is not used, so no functional change.
Unified · Split
| @@ -824,7 +824,7 @@ typedef struct { · 823 unmodified lines | ||
| 824 | 824 | __aligned_u64 image_size; |
| 825 | 825 | unsigned int image_code_type; |
| 826 | 826 | unsigned int image_data_type; |
| 827 | − unsigned long unload; | |
| 827 | + u32 unload; | |
| 828 | 828 | } efi_loaded_image_32_t; |
| 829 | 829 | |
| 830 | 830 | typedef struct { |
| @@ -840,14 +840,14 @@ typedef struct { · 9 unmodified lines | ||
| 840 | 840 | __aligned_u64 image_size; |
| 841 | 841 | unsigned int image_code_type; |
| 842 | 842 | unsigned int image_data_type; |
| 843 | − unsigned long unload; | |
| 843 | + u64 unload; | |
| 844 | 844 | } efi_loaded_image_64_t; |
| 845 | 845 | |
| 846 | 846 | typedef struct { |
| 847 | 847 | u32 revision; |
| 848 | − void *parent_handle; | |
| 848 | + efi_handle_t parent_handle; | |
| 849 | 849 | efi_system_table_t *system_table; |
| 850 | − void *device_handle; | |
| 850 | + efi_handle_t device_handle; | |
| 851 | 851 | void *file_path; |
| 852 | 852 | void *reserved; |
| 853 | 853 | u32 load_options_size; |
| @@ -856,7 +856,7 @@ typedef struct { · 2 unmodified lines | ||
| 856 | 856 | __aligned_u64 image_size; |
| 857 | 857 | unsigned int image_code_type; |
| 858 | 858 | unsigned int image_data_type; |
| 859 | − unsigned long unload; | |
| 859 | + efi_status_t (*unload)(efi_handle_t image_handle); | |
| 860 | 860 | } efi_loaded_image_t; |
| 861 | 861 | |
| 862 | 862 | |