summaryrefslogtreecommitdiffstats
path: root/src/boot/efi/xbootldr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/boot/efi/xbootldr.c')
-rw-r--r--src/boot/efi/xbootldr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/boot/efi/xbootldr.c b/src/boot/efi/xbootldr.c
index 583bc4216f..84e443135c 100644
--- a/src/boot/efi/xbootldr.c
+++ b/src/boot/efi/xbootldr.c
@@ -154,9 +154,10 @@ static EFI_STATUS find_device(EFI_HANDLE *device, EFI_DEVICE_PATH **ret_device_p
assert(device);
assert(ret_device_path);
- EFI_DEVICE_PATH *partition_path = DevicePathFromHandle(device);
- if (!partition_path)
- return EFI_NOT_FOUND;
+ EFI_DEVICE_PATH *partition_path;
+ err = BS->HandleProtocol(device, &DevicePathProtocol, (void **) &partition_path);
+ if (err != EFI_SUCCESS)
+ return err;
/* Find the (last) partition node itself. */
EFI_DEVICE_PATH *part_node = NULL;