summaryrefslogtreecommitdiffstats
path: root/drivers/efi/efi-device.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/efi/efi-device.c')
-rw-r--r--drivers/efi/efi-device.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/efi/efi-device.c b/drivers/efi/efi-device.c
index 305d337..a1aac2d 100644
--- a/drivers/efi/efi-device.c
+++ b/drivers/efi/efi-device.c
@@ -311,7 +311,7 @@ static int efi_bus_match(struct device_d *dev, struct driver_d *drv)
int i;
for (i = 0; i < efidev->num_guids; i++) {
- if (!memcmp(&efidrv->guid, &efidev->guids[i], sizeof(efi_guid_t))) {
+ if (!efi_guidcmp(efidrv->guid, efidev->guids[i])) {
BS->handle_protocol(efidev->handle, &efidev->guids[i],
&efidev->protocol);
return 0;
@@ -398,13 +398,19 @@ static int is_bio_usbdev(struct efi_device *efidev)
return 0;
}
+static struct efi_device *bootdev;
+
+struct efi_device *efi_get_bootsource(void)
+{
+ return bootdev;
+}
+
static void efi_set_bootsource(void)
{
enum bootsource src = BOOTSOURCE_UNKNOWN;
int instance = BOOTSOURCE_INSTANCE_UNKNOWN;
efi_handle_t *efi_parent;
- struct efi_device *bootdev;
if (!efi_loaded_image->parent_handle)
goto out;