From fa59068514e85be67ddc37db18a08853d074e72f Mon Sep 17 00:00:00 2001 From: raywu Date: Thu, 12 Sep 2019 11:47:29 +0800 Subject: [Fixed] HDD could not be Detected under Uefi Mode --- Core/EM/EfiOsBootOptionNames/EfiOsBootOrder.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/Core/EM/EfiOsBootOptionNames/EfiOsBootOrder.c b/Core/EM/EfiOsBootOptionNames/EfiOsBootOrder.c index 3501a4b..7e5a03c 100644 --- a/Core/EM/EfiOsBootOptionNames/EfiOsBootOrder.c +++ b/Core/EM/EfiOsBootOptionNames/EfiOsBootOrder.c @@ -1549,8 +1549,21 @@ BOOLEAN RemoveLegacyGptHdd(BOOT_DEVICE *Device){ Status = pRS->GetVariable(L"Setup", &SetupGuid, NULL, &Size, &SetupData); -// if( Device->BbsEntry->DeviceType != BBS_HARDDISK && SetupData.OnlyBootHDD == 1 ) return TRUE; - if( Device->BbsEntry->Class != PCI_CL_MASS_STOR && SetupData.OnlyBootHDD == 1 ) return TRUE; +//ray_override / [Fixed] HDD could not be Detected under Uefi Mode / Modified >> +//// if( Device->BbsEntry->DeviceType != BBS_HARDDISK && SetupData.OnlyBootHDD == 1 ) return TRUE; +// if( Device->BbsEntry->Class != PCI_CL_MASS_STOR && SetupData.OnlyBootHDD == 1 ) return TRUE; + if ( SetupData.OnlyBootHDD == 1 ) { + if ( Device->BbsEntry == NULL ) { + if ( BlkIo->Media->RemovableMedia == FALSE ) + return FALSE ; + else + return TRUE ; + } else { + if( Device->BbsEntry->Class != PCI_CL_MASS_STOR ) return TRUE; + return FALSE; + } + } +//ray_override / [Fixed] HDD could not be Detected under Uefi Mode / Modified << return FALSE; } #endif -- cgit v1.2.3