[haiku-commits] haiku: hrev54013 - in headers/private/kernel/platform/efi/protocol: . headers/private/kernel/platform/efi

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 28 Mar 2020 16:03:42 -0400 (EDT)

hrev54013 adds 1 changeset to branch 'master'
old head: a5ca573d2783b7e63507a4561d1f789f50776908
new head: bf9093e79443b7a3cf8986999e20a7fe0626abdc
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=bf9093e79443+%5Ea5ca573d2783

----------------------------------------------------------------------------

bf9093e79443: Efi: fix headers for 32 bit platforms
  
  Change-Id: Id43bfcbfc24b1adb8f6e9fff587c6df9b62910f2
  Reviewed-on: https://review.haiku-os.org/c/haiku/+/2413
  Reviewed-by: Alex von Gluck IV <kallisti5@xxxxxxxxxxx>
  Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

                                              [ X512 <danger_mail@xxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev54013
Commit:      bf9093e79443b7a3cf8986999e20a7fe0626abdc
URL:         https://git.haiku-os.org/haiku/commit/?id=bf9093e79443
Author:      X512 <danger_mail@xxxxxxx>
Date:        Mon Mar 23 17:49:13 2020 UTC
Committer:   waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Sat Mar 28 20:03:37 2020 UTC

----------------------------------------------------------------------------

2 files changed, 8 insertions(+), 3 deletions(-)
headers/private/kernel/platform/efi/protocol/block-io.h | 4 ++--
headers/private/kernel/platform/efi/types.h             | 7 ++++++-

----------------------------------------------------------------------------

diff --git a/headers/private/kernel/platform/efi/protocol/block-io.h 
b/headers/private/kernel/platform/efi/protocol/block-io.h
index cf53e6b49b..6f1c52b8d2 100644
--- a/headers/private/kernel/platform/efi/protocol/block-io.h
+++ b/headers/private/kernel/platform/efi/protocol/block-io.h
@@ -26,10 +26,10 @@ struct efi_block_io_protocol {
                         bool ExtendedVerification) EFIAPI;
     efi_status (*ReadBlocks)(efi_block_io_protocol* self,
                              uint32_t MediaId, uint64_t LBA,
-                             uint64_t BufferSize, void* Buffer) EFIAPI;
+                             size_t BufferSize, void* Buffer) EFIAPI;
     efi_status (*WriteBlocks)(efi_block_io_protocol* self,
                               uint32_t MediaId, uint64_t LBA,
-                              uint64_t BufferSize, const void* Buffer) EFIAPI;
+                              size_t BufferSize, const void* Buffer) EFIAPI;
     efi_status (*FlushBlocks)(efi_block_io_protocol* self);
 
 
diff --git a/headers/private/kernel/platform/efi/types.h 
b/headers/private/kernel/platform/efi/types.h
index 0295e7fbc6..8aec5553d5 100644
--- a/headers/private/kernel/platform/efi/types.h
+++ b/headers/private/kernel/platform/efi/types.h
@@ -14,9 +14,14 @@
 #define EFIAPI
 #endif
 
+#if UINTPTR_MAX == 0xffffffff
+#define EFI_ERROR_MASK 0x80000000
+#elif UINTPTR_MAX == 0xffffffffffffffff
 #define EFI_ERROR_MASK 0x8000000000000000
+#endif
+
 #define EFI_ERR(x) (EFI_ERROR_MASK | x)
-#define EFI_ERROR(x) (((int64_t)x) < 0)
+#define EFI_ERROR(x) (((ssize_t)x) < 0)
 
 #define EFI_SUCCESS              0
 #define EFI_LOAD_ERROR           EFI_ERR(1)


Other related posts:

  • » [haiku-commits] haiku: hrev54013 - in headers/private/kernel/platform/efi/protocol: . headers/private/kernel/platform/efi - waddlesplash