LoaderType = ReadUnaligned32 ((CONST UINT32*)&OptionalData->Header.LoaderType);\r
\r
if (LoaderType == BDS_LOADER_EFI_APPLICATION) {\r
- if ((BootOption->Attributes & LOAD_OPTION_CATEGORY_BOOT) == 0) {\r
+ if ((BootOption->Attributes & LOAD_OPTION_CATEGORY) == LOAD_OPTION_CATEGORY_APP) {\r
// Need to connect every drivers to ensure no dependencies are missing for the application\r
BdsConnectAllDrivers ();\r
}\r
}\r
} else {\r
// Connect all the drivers if the EFI Application is not a EFI OS Loader\r
- if ((BootOption->Attributes & LOAD_OPTION_CATEGORY_BOOT) == 0) {\r
+ if ((BootOption->Attributes & LOAD_OPTION_CATEGORY) == LOAD_OPTION_CATEGORY_APP) {\r
BdsConnectAllDrivers ();\r
}\r
\r