efi: Correct calculate_paths() when an image is used
The device path is updated if an image is used, so move the setting of
*device_pathp lower, to take account of this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 73ad2d9909 ("efi: Move efi_bootflow_run() to a common file")
This commit is contained in:
@@ -46,7 +46,6 @@ efi_status_t calculate_paths(const char *dev, const char *devnr,
|
||||
if (ret != EFI_SUCCESS)
|
||||
return ret;
|
||||
|
||||
*device_pathp = device;
|
||||
if (image) {
|
||||
/* FIXME: image should not contain device */
|
||||
struct efi_device_path *image_tmp = image;
|
||||
@@ -54,6 +53,7 @@ efi_status_t calculate_paths(const char *dev, const char *devnr,
|
||||
efi_dp_split_file_path(image, &device, &image);
|
||||
efi_free_pool(image_tmp);
|
||||
}
|
||||
*device_pathp = device;
|
||||
*image_pathp = image;
|
||||
log_debug("- boot device %pD\n", device);
|
||||
if (image)
|
||||
|
||||
Reference in New Issue
Block a user