efi_loader: signature of StartImage and Exit
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Fri, 28 Dec 2018 11:41:15 +0000 (12:41 +0100)
committerAlexander Graf <agraf@suse.de>
Wed, 13 Feb 2019 08:40:05 +0000 (09:40 +0100)
We use u16* for Unicode strings and efi_uintn_t for UINTN. Correct the
signature of efi_exit() and efi_start_image().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
include/efi_api.h
lib/efi_loader/efi_boottime.c

index 0e5c6e92d0de749fdbe40c5e90775a2d43b0b5ec..4389dbeddcb1c1147097679bc120cb028b9547ce 100644 (file)
@@ -115,11 +115,11 @@ struct efi_boot_services {
                        struct efi_device_path *file_path, void *source_buffer,
                        efi_uintn_t source_size, efi_handle_t *image);
        efi_status_t (EFIAPI *start_image)(efi_handle_t handle,
-                                          unsigned long *exitdata_size,
-                                          s16 **exitdata);
+                                          efi_uintn_t *exitdata_size,
+                                          u16 **exitdata);
        efi_status_t (EFIAPI *exit)(efi_handle_t handle,
                                    efi_status_t exit_status,
-                                   unsigned long exitdata_size, s16 *exitdata);
+                                   efi_uintn_t exitdata_size, u16 *exitdata);
        efi_status_t (EFIAPI *unload_image)(efi_handle_t image_handle);
        efi_status_t (EFIAPI *exit_boot_services)(efi_handle_t, unsigned long);
 
index f592e4083ffe049b30f526420237ed57e18e986d..88386ff676064d7f9c0c6fcd500f7cef4f3aaff3 100644 (file)
@@ -1706,8 +1706,8 @@ error:
  * Return: status code
  */
 static efi_status_t EFIAPI efi_start_image(efi_handle_t image_handle,
-                                          unsigned long *exit_data_size,
-                                          s16 **exit_data)
+                                          efi_uintn_t *exit_data_size,
+                                          u16 **exit_data)
 {
        struct efi_loaded_image_obj *image_obj =
                (struct efi_loaded_image_obj *)image_handle;
@@ -1773,8 +1773,8 @@ static efi_status_t EFIAPI efi_start_image(efi_handle_t image_handle,
  */
 static efi_status_t EFIAPI efi_exit(efi_handle_t image_handle,
                                    efi_status_t exit_status,
-                                   unsigned long exit_data_size,
-                                   int16_t *exit_data)
+                                   efi_uintn_t exit_data_size,
+                                   u16 *exit_data)
 {
        /*
         * TODO: We should call the unload procedure of the loaded
@@ -1783,7 +1783,7 @@ static efi_status_t EFIAPI efi_exit(efi_handle_t image_handle,
        struct efi_loaded_image_obj *image_obj =
                (struct efi_loaded_image_obj *)image_handle;
 
-       EFI_ENTRY("%p, %ld, %ld, %p", image_handle, exit_status,
+       EFI_ENTRY("%p, %ld, %zu, %p", image_handle, exit_status,
                  exit_data_size, exit_data);
 
        /* Make sure entry/exit counts for EFI world cross-overs match */