Chameleon

Chameleon Commit Details

Date:2011-08-16 14:50:35 (12 years 8 months ago)
Author:Evan Lojewski
Commit:1406
Parents: 1405
Message:Revert drivers.c so that kexts are only loaded when OSBundleRequired is set and that value is not safe mode. Added some comments about it too.
Changes:
M/trunk/i386/boot2/drivers.c

File differences

trunk/i386/boot2/drivers.c
746746
747747
748748
749
750
751
752
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
753764
754765
755766
756767
757768
758769
770
759771
760772
761773
if (length == -1) return -1;
if (!(gBootMode & kBootModeSafe) &&
XMLGetProperty(moduleDict, kPropOSBundleRequired) &&
strcmp(XMLCastString(XMLGetProperty(moduleDict, kPropOSBundleRequired)), "Safe Boot") == 0)
// NOTE: This currenlt knows nothing about /Extra/. If you have a kext in there that
// does not have the required property, it will not load.
char* required = XMLCastString(XMLGetProperty(moduleDict, kPropOSBundleRequired));
if(!required) return -2; // don't load te kext.
// NOTE: Only valid values are
// kOSBundleRequiredConsole - Always required (for text? console)
// kOSBundleRequiredLocalRoot - Required for local disk booting
// kOSBundleRequiredNetworkRoot - required boot from network
// kOSBundleRequiredRoot - always needed
// kOSBundleRequiredSafeBoot - Only loaded for safe mode.
// Others - invalid
if (!(gBootMode & kBootModeSafe) && strcmp(required, "Safe Boot") == 0)
{
// Don't load Safe Boot kexts if -x not specified.
XMLFreeTag(moduleDict);
return -2;
}
tmpModule = malloc(sizeof(Module));
if (tmpModule == 0)
{

Archive Download the corresponding diff file

Revision: 1406