mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
MdeModulePkg/BmBoot: Skip removable media if it is not present
Only enumerate devices that have media present. Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhichao Gao <zhichao.gao@intel.com> Cc: Ray Ni <ray.ni@intel.com> Reviewed-by: Sean Rhodes <sean@starlabs.systems> Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
This commit is contained in:
parent
16e0969ef7
commit
0e57170097
@ -2218,6 +2218,15 @@ BmEnumerateBootOptions (
|
||||
continue;
|
||||
}
|
||||
|
||||
//
|
||||
// Skip removable media if not present
|
||||
//
|
||||
if ((BlkIo->Media->RemovableMedia == TRUE) &&
|
||||
(BlkIo->Media->MediaPresent == FALSE))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Description = BmGetBootDescription (Handles[Index]);
|
||||
BootOptions = ReallocatePool (
|
||||
sizeof (EFI_BOOT_MANAGER_LOAD_OPTION) * (*BootOptionCount),
|
||||
|
Loading…
x
Reference in New Issue
Block a user