mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-27 12:15:19 +01:00
Fix "ROM" parameter not read soon enough.
This commit is contained in:
parent
69a47c5fac
commit
96909661a0
@ -3199,13 +3199,16 @@ EFI_STATUS GetEarlyUserSettings (
|
|||||||
if (RtVariablesDict != NULL) {
|
if (RtVariablesDict != NULL) {
|
||||||
const TagStruct* Prop = RtVariablesDict->propertyForKey("ROM");
|
const TagStruct* Prop = RtVariablesDict->propertyForKey("ROM");
|
||||||
if (Prop != NULL) {
|
if (Prop != NULL) {
|
||||||
if ( !Prop->isString() ) {
|
if ( Prop->isString() && Prop->getString()->stringValue().equalIC("UseMacAddr0") ) {
|
||||||
// that's ok. Property can be data, but not when the value is 'UseMacAddr0' or 'UseMacAddr1';
|
gSettings.RtVariables.RtROMAsString = Prop->getString()->stringValue();
|
||||||
}else{
|
} else if ( Prop->isString() && Prop->getString()->stringValue().equalIC("UseMacAddr1") ) {
|
||||||
if ((Prop->getString()->stringValue().equalIC("UseMacAddr0")) ||
|
gSettings.RtVariables.RtROMAsString = Prop->getString()->stringValue();
|
||||||
(Prop->getString()->stringValue().equalIC("UseMacAddr1"))) {
|
} else if ( Prop->isString() || Prop->isData() ) { // GetDataSetting accept both
|
||||||
// gSettings.RtVariables.GetLegacyLanAddress = TRUE;
|
UINTN ROMLength = 0;
|
||||||
}
|
uint8_t* ROM = GetDataSetting(RtVariablesDict, "ROM", &ROMLength);
|
||||||
|
gSettings.RtVariables.RtROMAsData.stealValueFrom(ROM, ROMLength);
|
||||||
|
} else {
|
||||||
|
MsgLog("MALFORMED PLIST : property not string or data in RtVariables/ROM\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user