From 8d403d74c91210880e898240a4edebf1a8ac472e Mon Sep 17 00:00:00 2001 From: Alex Zenla Date: Sun, 2 Nov 2025 04:16:05 -0500 Subject: [PATCH] fix(shim/hook): clarify const-ness of some parameters --- src/integrations/shim/hook.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/integrations/shim/hook.rs b/src/integrations/shim/hook.rs index f5a9cc6..157bcf5 100644 --- a/src/integrations/shim/hook.rs +++ b/src/integrations/shim/hook.rs @@ -20,7 +20,7 @@ pub struct SecurityArchProtocol { pub file_authentication_state: unsafe extern "efiapi" fn( this: *const SecurityArchProtocol, status: u32, - path: *mut FfiDevicePath, + path: *const FfiDevicePath, ) -> Status, } @@ -30,8 +30,8 @@ pub struct SecurityArch2Protocol { /// Determines the file authentication. pub file_authentication: unsafe extern "efiapi" fn( this: *const SecurityArch2Protocol, - path: *mut FfiDevicePath, - file_buffer: *mut u8, + path: *const FfiDevicePath, + file_buffer: *const u8, file_size: usize, boot_policy: bool, ) -> Status, @@ -87,7 +87,7 @@ impl SecurityHook { unsafe extern "efiapi" fn arch_file_authentication_state( this: *const SecurityArchProtocol, status: u32, - path: *mut FfiDevicePath, + path: *const FfiDevicePath, ) -> Status { // Verify the path is not null. if path.is_null() { @@ -145,8 +145,8 @@ impl SecurityHook { /// Takes the `path` and a file buffer to determine the verification. unsafe extern "efiapi" fn arch2_file_authentication( this: *const SecurityArch2Protocol, - path: *mut FfiDevicePath, - file_buffer: *mut u8, + path: *const FfiDevicePath, + file_buffer: *const u8, file_size: usize, boot_policy: bool, ) -> Status {