aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2021-10-15 01:31:02 +0200
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2021-10-21 03:46:04 +0200
commit0421735dd8ffc82db22c3767e7aa38c65fc7298e (patch)
tree9b1b9fb1eb831410422689e70d7476cfc03053c7 /lib
parentebdea88d57d5e67b8f6e6cf615300eedbc7200a9 (diff)
efi_loader: efi_dp_from_lo() don't copy GUID
Instead of copying a GUID and then using a pointer to the copy for calling guidcmp(), just pass the pointer to the orginal GUID. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/efi_loader/efi_device_path.c5
-rw-r--r--lib/efi_loader/efi_helper.c2
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c
index a09090a32e..a588712ef1 100644
--- a/lib/efi_loader/efi_device_path.c
+++ b/lib/efi_loader/efi_device_path.c
@@ -1218,7 +1218,8 @@ ssize_t efi_dp_check_length(const struct efi_device_path *dp,
*/
struct
efi_device_path *efi_dp_from_lo(struct efi_load_option *lo,
- efi_uintn_t *size, efi_guid_t guid)
+ efi_uintn_t *size,
+ const efi_guid_t *guid)
{
struct efi_device_path *fp = lo->file_path;
struct efi_device_path_vendor *vendor;
@@ -1233,7 +1234,7 @@ efi_device_path *efi_dp_from_lo(struct efi_load_option *lo,
continue;
vendor = (struct efi_device_path_vendor *)fp;
- if (!guidcmp(&vendor->guid, &guid))
+ if (!guidcmp(&vendor->guid, guid))
return efi_dp_dup(fp);
}
log_debug("VenMedia(%pUl) not found in %ls\n", &guid, lo->label);
diff --git a/lib/efi_loader/efi_helper.c b/lib/efi_loader/efi_helper.c
index d03a736461..4c5b7cd2e1 100644
--- a/lib/efi_loader/efi_helper.c
+++ b/lib/efi_loader/efi_helper.c
@@ -83,7 +83,7 @@ struct efi_device_path *efi_get_dp_from_boot(const efi_guid_t guid)
if (ret != EFI_SUCCESS)
goto out;
- tmp = efi_dp_from_lo(&lo, &size, guid);
+ tmp = efi_dp_from_lo(&lo, &size, &guid);
if (!tmp)
goto out;