From e13ac7386ea425c9222e05a2f9879d5af5cb91f6 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Wed, 4 Aug 2021 13:24:11 -0400 Subject: Make CopyMem() work with EFI's declaration EFI_BOOT_SERVICES includes CopyMem() and SetMem() functions which are marked EFIAPI, and in the case of CopyMem() does not mark the source argument as CONST. This patch makes all our invocations work with that, so (once gnu-efi's implementation is fixed to match) we can use the existing implementation as the implementation in a mock EFI_BOOT_SERVICES. Signed-off-by: Peter Jones --- lib/variables.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/variables.c') diff --git a/lib/variables.c b/lib/variables.c index ff61d0e2..3ec05478 100644 --- a/lib/variables.c +++ b/lib/variables.c @@ -49,7 +49,7 @@ fill_esl(const EFI_SIGNATURE_DATA *first_sig, const size_t howmany, sl->SignatureListSize = needed; sd = (EFI_SIGNATURE_DATA *)(out + sizeof(EFI_SIGNATURE_LIST)); - CopyMem(sd, first_sig, data_len); + CopyMem(sd, (void *)first_sig, data_len); return EFI_SUCCESS; } @@ -69,8 +69,8 @@ fill_esl_with_one_signature(const uint8_t *data, const uint32_t data_len, if (out) { sd = AllocateZeroPool(sig_size); if (owner) - CopyMem(sd, owner, sizeof(EFI_GUID)); - CopyMem(sd->SignatureData, data, data_len); + CopyMem(sd, (void *)owner, sizeof(EFI_GUID)); + CopyMem(sd->SignatureData, (void *)data, data_len); } efi_status = fill_esl(sd, 1, type, sig_size, out, outlen); -- cgit v1.2.3