diff options
author | Steve McIntyre <steve@einval.com> | 2021-03-23 23:49:46 +0000 |
---|---|---|
committer | Steve McIntyre <steve@einval.com> | 2021-03-23 23:49:46 +0000 |
commit | 1251a7ba86fc40a6aad8b4fecdbca2b61808d9fa (patch) | |
tree | 2125fda549aaca55cb49a48d54be77dec7fbf3df /netboot.c | |
parent | 85b409232ce89b34626df9d72abedf5d4f5ccef6 (diff) | |
parent | 031e5cce385d3f96b1caa1d53495332a7eb03749 (diff) | |
download | efi-boot-shim-debian/15.3-1.tar.gz efi-boot-shim-debian/15.3-1.zip |
Update upstream source from tag 'upstream/15.3'debian/15.3-1
Update to upstream version '15.3'
with Debian dir 1b484f1c1ac270604a5a1451b34de4b0865c6211
Diffstat (limited to 'netboot.c')
-rw-r--r-- | netboot.c | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -13,8 +13,6 @@ #include "shim.h" -#include <string.h> - #define ntohs(x) __builtin_bswap16(x) /* supported both by GCC and clang */ #define htons(x) ntohs(x) @@ -174,7 +172,7 @@ static BOOLEAN extract_tftp_info(CHAR8 *url) // to check against str2ip6() errors memset(ip6inv, 0, sizeof(ip6inv)); - if (strncmp((UINT8 *)url, (UINT8 *)"tftp://", 7)) { + if (strncmp((const char *)url, (const char *)"tftp://", 7)) { console_print(L"URLS MUST START WITH tftp://\n"); return FALSE; } @@ -260,7 +258,7 @@ static EFI_STATUS parseDhcp4() pkt_v4 = &pxe->Mode->PxeReply.Dhcpv4; } - INTN dir_len = strnlena((CHAR8 *)pkt_v4->BootpBootFile, 127); + INTN dir_len = strnlen((CHAR8 *)pkt_v4->BootpBootFile, 127); INTN i; UINT8 *dir = pkt_v4->BootpBootFile; @@ -276,19 +274,19 @@ static EFI_STATUS parseDhcp4() return EFI_OUT_OF_RESOURCES; if (dir_len > 0) { - strncpya(full_path, (CHAR8 *)dir, dir_len); + strncpy(full_path, (CHAR8 *)dir, dir_len); if (full_path[dir_len-1] == '/' && template[0] == '/') full_path[dir_len-1] = '\0'; } if (dir_len == 0 && dir[0] != '/' && template[0] == '/') template_ofs++; - strcata(full_path, template + template_ofs); + strcat(full_path, template + template_ofs); memcpy(&tftp_addr.v4, pkt_v4->BootpSiAddr, 4); return EFI_SUCCESS; } -EFI_STATUS parseNetbootinfo(EFI_HANDLE image_handle) +EFI_STATUS parseNetbootinfo(EFI_HANDLE image_handle UNUSED) { EFI_STATUS efi_status; @@ -309,7 +307,7 @@ EFI_STATUS parseNetbootinfo(EFI_HANDLE image_handle) return efi_status; } -EFI_STATUS FetchNetbootimage(EFI_HANDLE image_handle, VOID **buffer, UINT64 *bufsiz) +EFI_STATUS FetchNetbootimage(EFI_HANDLE image_handle UNUSED, VOID **buffer, UINT64 *bufsiz) { EFI_STATUS efi_status; EFI_PXE_BASE_CODE_TFTP_OPCODE read = EFI_PXE_BASE_CODE_TFTP_READ_FILE; |