Ignore Device Paths in the Boot Info that don't have Media path

nodes. These show up in default entries on SuperMicro motherboards and
elsewhere. Before, we couldn't find a block device associated with the
device path and return BAD_CHOICE which was an instant
failure. However, a VendHw node isn't specifc, so when we don't find a
media path, return NOT_SPECIFIC so that the rest of the algorithms
work.

Sponsored by: Netflix.
This commit is contained in:
Warner Losh 2018-07-26 05:08:58 +00:00
parent 3468bf40ce
commit 1e354803ee

View File

@ -355,10 +355,15 @@ match_boot_info(EFI_LOADED_IMAGE *img __unused, char *boot_info, size_t bisz)
/*
* If there's only one item in the list, then nothing was
* specified.
* specified. Or if the last path doesn't have a media
* path in it. Those show up as various VenHw() nodes
* which are basically opaque to us. Don't count those
* as something specifc.
*/
if (last_dp == first_dp)
return NOT_SPECIFIC;
if (efi_devpath_to_media_path(last_dp) == NULL)
return NOT_SPECIFIC;
/*
* OK. At this point we either have a good path or a bad one.