We should not pass GUIDs by value as this requires copying.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
efi_status_t efi_file_size(struct efi_file_handle *fh, efi_uintn_t *size);
/* get a device path from a Boot#### option */
-struct efi_device_path *efi_get_dp_from_boot(const efi_guid_t guid);
+struct efi_device_path *efi_get_dp_from_boot(const efi_guid_t *guid);
/* get len, string (used in u-boot crypto from a guid */
const char *guid_to_sha_str(const efi_guid_t *guid);
*
* Return: device path or NULL. Caller must free the returned value
*/
-struct efi_device_path *efi_get_dp_from_boot(const efi_guid_t guid)
+struct efi_device_path *efi_get_dp_from_boot(const efi_guid_t *guid)
{
struct efi_load_option lo;
void *var_value;
if (ret != EFI_SUCCESS)
goto err;
- return efi_dp_from_lo(&lo, &guid);
+ return efi_dp_from_lo(&lo, guid);
err:
free(var_value);
* We can then use this specific return value and not install the
* protocol, while allowing the boot to continue
*/
- dp = efi_get_dp_from_boot(efi_lf2_initrd_guid);
+ dp = efi_get_dp_from_boot(&efi_lf2_initrd_guid);
if (!dp)
return EFI_INVALID_PARAMETER;