Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7e803bcc57
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| size_t blockCount = 0; | ||
| for (size_t blockIdx = 0; | ||
| blockIdx < KernelAndKextPatches.KextsToBlock.size(); blockIdx++) { | ||
| if (KernelAndKextPatches.KextsToBlock[blockIdx].ShouldBlock(macOSVersion)) { | ||
| blockCount++; |
There was a problem hiding this comment.
Defer KextsToBlock filtering until macOSVersion is known
The new KextsToBlock loop evaluates ShouldBlock(macOSVersion) before the later “Correct OSVersion if it was not found” logic runs, and ShouldBlock returns false when CurrOS is empty. This means any KextsToBlock entries that rely on MatchOS will be silently skipped in cases where macOSVersion is only populated later (e.g., installer boot.efi detection), so the intended kext blocks never make it into OpenCore config. Consider moving the block generation to after OS version correction or passing version constraints through to OpenCore so it can decide at boot time.
Useful? React with 👍 / 👎.
Motivation
BlockSkywalkand provide a flexibleKextsToBlockarray that can list zero-or-more kexts to block with per-entryMatchOSandDisabledsemantics.Description
BlockSkywalksupport and UI field and added a newKextsToBlockplist array example toconfig-sample.plistwith the requested fields (Comment,Disabled,MatchOS,Name).KernelAndKextPatches_KextsToBlock_Classto the XML config schema and integratedKextsToBlockinto the config parser so entries are validated and accessible via the settings model.KEXT_TO_BLOCKmodel withtakeValueFrom(...)and aShouldBlock(const MacOsVersion&)method implementing theDisabled/MatchOS/Namelogic and case-insensitiveallhandling.Kernel.Blockgeneration forBlockSkywalkwith a loop that buildsKernel.Blockentries from allKextsToBlockentries that return true fromShouldBlock, preserving safety for absent or empty arrays and avoiding crashes.Testing
Codex Task