diff options
author | Gene Cumm <gene.cumm@gmail.com> | 2015-09-10 05:55:41 -0400 |
---|---|---|
committer | Gene Cumm <gene.cumm@gmail.com> | 2015-09-10 05:55:41 -0400 |
commit | 26d37f75aff50879795692728dbeb8ca57a8a226 (patch) | |
tree | 5f161f6a34123affeb24e48c3842a7563cda295f | |
parent | 054f9453859b3d3e610721fca4ffdea8b6a8b85f (diff) | |
parent | 9c8186b47649e5710e75c968b097aea6e3cb86e9 (diff) | |
download | syslinux-26d37f75aff50879795692728dbeb8ca57a8a226.tar.gz |
efi: Merge cleanup
Merge git://github.com/Celelibi/syslinux.git branch 'fix/efi/cleanup'
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
-rw-r--r-- | efi/main.c | 6 | ||||
-rw-r--r-- | efi/pxe.c | 1 |
2 files changed, 3 insertions, 4 deletions
@@ -63,7 +63,7 @@ bool efi_get_MAC( EFI_DEVICE_PATH * pDevPath, uint8_t * mac, uint16_t mac_size) /* Find the handler to dump this device path node */ if (DevicePathType(DevPathNode) == MESSAGING_DEVICE_PATH && DevicePathSubType(DevPathNode) == MSG_MAC_ADDR_DP) { - MAC = DevPathNode; + MAC = (MAC_ADDR_DEVICE_PATH *)DevPathNode; CopyMem(mac, MAC->MacAddress.Addr, PXE_MAC_LENGTH); FreePool(pDevPath); return TRUE; @@ -105,13 +105,13 @@ struct efi_binding *efi_create_binding(EFI_GUID *bguid, EFI_GUID *pguid) status = EFI_UNSUPPORTED; goto free_binding; } - efi_get_MAC(DevicePath, &mac_1, PXE_MAC_LENGTH); + efi_get_MAC(DevicePath, mac_1, PXE_MAC_LENGTH); status = LibLocateHandle(ByProtocol, bguid, NULL, &nr_handles, &handles); if (status != EFI_SUCCESS) goto free_binding; for (i = 0; i < nr_handles; i++) { DevicePath = DevicePathFromHandle(handles[i]); - if (efi_get_MAC(DevicePath, &mac_2, PXE_MAC_LENGTH) + if (efi_get_MAC(DevicePath, mac_2, PXE_MAC_LENGTH) && memcmp(mac_1, mac_2, PXE_MAC_LENGTH) == 0) { sb_handle = handles[i]; status = uefi_call_wrapper(BS->OpenProtocol, 6, sb_handle, @@ -96,7 +96,6 @@ void net_parse_dhcp(void) uint8_t hardlen; uint32_t ip; char dst[256]; - UINTN i = 0; status = uefi_call_wrapper(BS->HandleProtocol, 3, image_device_handle, &PxeBaseCodeProtocol, (void **)&bc); |