aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSughosh Ganu <sughosh.ganu@linaro.org>2019-12-29 00:01:04 +0530
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2020-01-07 18:08:20 +0100
commit61e42d9465ef36857693cc3db615438241a06bf6 (patch)
treea51ce1545f9f3f18755f5f1ffc02a75b6e649545 /lib
parent9bb758aab63dd5972b27b8dc1a0f22224b54f885 (diff)
downloadu-boot-61e42d9465ef36857693cc3db615438241a06bf6.zip
u-boot-61e42d9465ef36857693cc3db615438241a06bf6.tar.gz
u-boot-61e42d9465ef36857693cc3db615438241a06bf6.tar.bz2
efi_loader: Add guidcpy function
Add guidcpy function to copy the source guid to the destination guid. Use this function instead of memcpy for copying to the destination guid. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Use void * instead of efi_guid_t * for arguments to allow copying unaligned GUIDs. The GUIDs of configuration tables are __packed. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/efi_loader/efi_boottime.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index 88a7604..3103a50 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -1401,7 +1401,7 @@ static efi_status_t EFIAPI efi_register_protocol_notify(
}
item->event = event;
- memcpy(&item->protocol, protocol, sizeof(efi_guid_t));
+ guidcpy(&item->protocol, protocol);
INIT_LIST_HEAD(&item->handles);
list_add_tail(&item->link, &efi_register_notify_events);
@@ -1632,7 +1632,7 @@ efi_status_t efi_install_configuration_table(const efi_guid_t *guid,
return EFI_OUT_OF_RESOURCES;
/* Add a new entry */
- memcpy(&systab.tables[i].guid, guid, sizeof(*guid));
+ guidcpy(&systab.tables[i].guid, guid);
systab.tables[i].table = table;
systab.nr_tables = i + 1;