extern const efi_guid_t efi_guid_device_path_utilities_protocol;
/* GUID of the deprecated Unicode collation protocol */
extern const efi_guid_t efi_guid_unicode_collation_protocol;
+/* GUIDs of the Load File and Load File2 protocol */
+extern const efi_guid_t efi_guid_load_file_protocol;
+extern const efi_guid_t efi_guid_load_file2_protocol;
/* GUID of the Unicode collation protocol */
extern const efi_guid_t efi_guid_unicode_collation_protocol2;
extern const efi_guid_t efi_guid_hii_config_routing_protocol;
/* event group ResetSystem() invoked (before ExitBootServices) */
const efi_guid_t efi_guid_event_group_reset_system =
EFI_EVENT_GROUP_RESET_SYSTEM;
+/* GUIDs of the Load File and Load File2 protocols */
+const efi_guid_t efi_guid_load_file_protocol = EFI_LOAD_FILE_PROTOCOL_GUID;
+const efi_guid_t efi_guid_load_file2_protocol = EFI_LOAD_FILE2_PROTOCOL_GUID;
static efi_status_t EFIAPI efi_disconnect_controller(
efi_handle_t controller_handle,
#include <efi_loader.h>
#include <efi_load_initrd.h>
-static const efi_guid_t efi_guid_load_file2_protocol =
- EFI_LOAD_FILE2_PROTOCOL_GUID;
-
static efi_status_t EFIAPI
efi_load_file2_initrd(struct efi_load_file_protocol *this,
struct efi_device_path *file_path, bool boot_policy,
static int execute(void)
{
- efi_guid_t lf2_proto_guid = EFI_LOAD_FILE2_PROTOCOL_GUID;
struct efi_load_file_protocol *lf2;
struct efi_device_path *dp2, *dp2_invalid;
efi_status_t status;
memset(buffer, 0, sizeof(buffer));
dp2 = (struct efi_device_path *)&dp;
- status = boottime->locate_device_path(&lf2_proto_guid, &dp2, &handle);
+ status = boottime->locate_device_path(&efi_guid_load_file2_protocol,
+ &dp2, &handle);
if (status != EFI_SUCCESS) {
efi_st_error("Unable to locate device path\n");
return EFI_ST_FAILURE;
}
- status = boottime->handle_protocol(handle, &lf2_proto_guid,
+ status = boottime->handle_protocol(handle,
+ &efi_guid_load_file2_protocol,
(void **)&lf2);
if (status != EFI_SUCCESS) {
efi_st_error("Unable to locate protocol\n");