Configuration Processing
The OC config file is guaranteed to be processed at least once if found. Subject to the OpenCore bootstrapping mechanism, the presence of multiple OC config files may lead to the reading of any of them. It is permissible for no OC Config file to be present on disk. In such cases, if the implementation does not abort the boot process, all values shall follow the rules of invalid values and optional values.
The OC config file has restrictions on size, nesting levels, and number of keys:
- The
OC configfile size shall not exceed32 MBs. - The
OC configfile shall not have more than32nesting levels. - The
OC configfile may have up to32,768XML nodes within eachplist object. – Oneplist dictionaryitem is counted as a pair of nodes
Reading malformed OC config files results in undefined behaviour. Examples of malformed OC config files include the following:
OC configfiles that do not conform toDTD PLIST 1.0.OC configfiles with unsupported or non-conformantplist objectsfound in this document.OC configfiles violating restrictions on size, nesting levels, and number of keys.
It is recommended, but not required, to abort loading malformed OC config files and to continue as if an OC config file is not present. For forward compatibility, it is recommended, but not required, for the implementation to warn about the use of invalid values.
The recommended approach to interpreting invalid values is to conform to the following convention where applicable:
Type | Value |
|---|---|
plist string | Empty string (<string></string>) |
plist data | Empty data (<data></data>) |
plist integer | 0 (<integer>0</integer>) |
plist boolean | False (<false/>) |
plist tristate | False (<false/>) |