summaryrefslogtreecommitdiff
path: root/httpboot.c
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2021-08-04 13:24:11 -0400
committerPeter Jones <pjones@redhat.com>2021-09-07 17:05:04 -0400
commite13ac7386ea425c9222e05a2f9879d5af5cb91f6 (patch)
treeb4a9ee9785709a1ac74f1d8c3f431b481e8e960f /httpboot.c
parent0837d010a6ee140ff3cc770aadc89fbb015a7ca2 (diff)
downloadefi-boot-shim-e13ac7386ea425c9222e05a2f9879d5af5cb91f6.tar.gz
efi-boot-shim-e13ac7386ea425c9222e05a2f9879d5af5cb91f6.zip
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 <pjones@redhat.com>
Diffstat (limited to 'httpboot.c')
-rw-r--r--httpboot.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/httpboot.c b/httpboot.c
index 5d16bc1e..3340a7f9 100644
--- a/httpboot.c
+++ b/httpboot.c
@@ -179,8 +179,8 @@ generate_next_uri (CONST CHAR8 *current_uri, CONST CHAR8 *next_loader,
if (!*uri)
return EFI_OUT_OF_RESOURCES;
- CopyMem(*uri, current_uri, path_len);
- CopyMem(*uri + path_len, next_loader, next_len);
+ CopyMem(*uri, (void *)current_uri, path_len);
+ CopyMem(*uri + path_len, (void *)next_loader, next_len);
(*uri)[path_len + next_len] = '\0';
return EFI_SUCCESS;
@@ -209,7 +209,7 @@ extract_hostname (CONST CHAR8 *url, CHAR8 **hostname)
if (!*hostname)
return EFI_OUT_OF_RESOURCES;
- CopyMem(*hostname, start, host_len);
+ CopyMem(*hostname, (void *)start, host_len);
(*hostname)[host_len] = '\0';
return EFI_SUCCESS;