@@ -747,15 +747,23 @@ void LOADER_ENTRY::FilterKextsToBlock() {
747747 if (gSettings .KernelAndKextPatches .KextsToBlock .isEmpty ()) {
748748 return ;
749749 }
750+ DBG (" Filtering KextsToBlock:\n " );
751+ for (size_t i = 0 ; i < gSettings .KernelAndKextPatches .KextsToBlock .size (); i++) {
752+ const char * status = " allowed" ;
753+ if (!gSettings .KernelAndKextPatches .KextsToBlock [i].MenuItem .BValue ) {
754+ status = " disabled by user" ;
755+ } else if (!gSettings .KernelAndKextPatches .KextsToBlock [i].ShouldBlock (macOSVersion)) {
756+ status = " not allowed" ;
757+ }
750758
751- // size_t count = gSettings.KernelAndKextPatches.KextsToBlock.size();
752- // // size_t entryCount = KernelAndKextPatches.KextsToBlock.size();
753- // // size_t count = (settingsCount < entryCount) ? settingsCount : entryCount;
754- //
755- // for (size_t i = 0; i < count; ++i) {
756- // gSettings.KernelAndKextPatches.KextsToBlock[i].MenuItem.BValue =
757- // gSettings.KernelAndKextPatches.KextsToBlock[i].MenuItem.BValue ;
758- // }
759+ DBG ( " - [%02zu]: %s :: [OS: %s | MatchOS: %s] ==> %s \n " , i,
760+ gSettings . KernelAndKextPatches .KextsToBlock [i]. Label . c_str (),
761+ macOSVersion. asString (). c_str (),
762+ gSettings . KernelAndKextPatches . KextsToBlock [i]. MatchOS . notEmpty ()
763+ ? gSettings . KernelAndKextPatches . KextsToBlock [i]. MatchOS . c_str ()
764+ : " All " ,
765+ status) ;
766+ }
759767}
760768
761769//
@@ -1994,6 +2002,7 @@ void LOADER_ENTRY::StartLoader()
19942002
19952003 FilterKextPatches ();
19962004 FilterKernelPatches ();
2005+ FilterKextsToBlock ();
19972006 FilterBootPatches ();
19982007 if (LoadedImage &&
19992008 !BooterPatch ((UINT8 *)LoadedImage->ImageBase , LoadedImage->ImageSize )) {
0 commit comments