[U-Boot] [PATCH] efi_loader: LocateHandle should return EFI_NOT_FOUND if none found

Mark Kettenis mark.kettenis at xs4all.nl
Sun Aug 6 18:40:46 UTC 2017


> From: Rob Clark <robdclark at gmail.com>
> Date: Sun,  6 Aug 2017 12:23:50 -0400
> 
> Spotted this debugging OpenBSD's bootloader in qemu.  (Wouldn't really
> fix anything, the problem was not having any disks, but we should
> probably return the correct error code.)
> 
> Signed-off-by: Rob Clark <robdclark at gmail.com>

Reviewed-by: Mark Kettenis <kettenis at openbsd.org>

> ---
>  lib/efi_loader/efi_boottime.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
> index 5ff2d2d4b0..ada119325c 100644
> --- a/lib/efi_loader/efi_boottime.c
> +++ b/lib/efi_loader/efi_boottime.c
> @@ -643,6 +643,9 @@ static efi_status_t EFIAPI efi_locate_handle(
>  	}
>  
>  	*buffer_size = size;
> +	if (size == 0)
> +		return EFI_NOT_FOUND;
> +
>  	return EFI_SUCCESS;
>  }
>  
> -- 
> 2.13.0
> 
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot
> 
> 


More information about the U-Boot mailing list