block warning about ProductName

Signed-off-by: SergeySlice <sergey.slice@gmail.com>
This commit is contained in:
SergeySlice 2021-10-10 20:08:20 +03:00
parent 56fe2d4096
commit f014920e14
3 changed files with 8 additions and 8 deletions

View File

@ -243,7 +243,7 @@
<key>BooterConfig</key>
<string>0x28</string>
<key>CsrActiveConfig</key>
<string>0xA85</string>
<string>0xA87</string>
<key>MLB</key>
<string>C02032109R6DC771H</string>
<key>#HWTarget</key>

View File

@ -900,7 +900,7 @@ EFI_STATUS ConfigManager::LoadConfig(const XStringW& ConfName)
} else {
Model = GetDefaultModel();
}
// configPlist.getSMBIOS().ProductName.takeValueFrom(ApplePlatformData[Model].productName); //no such function?
if ( !EFI_ERROR(Status) ) {
gSettings.takeValueFrom(configPlist); // if load failed, keep default value.
}
@ -920,7 +920,7 @@ EFI_STATUS ConfigManager::LoadConfig(const XStringW& ConfName)
/*
* Fill LanCardArrayNonConst with what is found through UEFI
* LanCardArrayNonConst must be empty before clling, as there is no handling of duplicates (although it would be easy to do !)
* LanCardArrayNonConst must be empty before calling, as there is no handling of duplicates (although it would be easy to do !)
*/
void ConfigManager::GetUEFIMacAddress()
{

View File

@ -460,9 +460,9 @@ public:
virtual XBool validate(XmlLiteParser* xmlLiteParser, const XString8& xmlPath, const XmlParserPosition& keyPos, XBool generateErrors) override {
if ( !super::validate(xmlLiteParser, xmlPath, keyPos, generateErrors) ) return false;
if ( !ProductName.isDefined() ) {
return xmlLiteParser->addWarning(generateErrors, S8Printf("ProductName is not defined, the whole SMBIOS dict is ignored at line %d.", keyPos.getLine()));
}
// if ( !ProductName.isDefined() ) {
// return xmlLiteParser->addWarning(generateErrors, S8Printf("ProductName is not defined, the whole SMBIOS dict is ignored at line %d.", keyPos.getLine()));
// }
if ( BiosVersion.isDefined() ) {
if ( !BiosVersion.value().contains(".") ) {
xmlLiteParser->addWarning(generateErrors, S8Printf("BiosVersion '%s' doesn't contains a dot in dict '%s:%d'.", BiosVersion.value().c_str(), xmlPath.c_str(), keyPos.getLine()));
@ -480,7 +480,7 @@ public:
BiosVersion.reset();
}
}else{
xmlLiteParser->addWarning(generateErrors, S8Printf("Cannot check validity of BiosVersion because ProductName is not set. Dict '%s:%d'.", xmlPath.c_str(), keyPos.getLine()));
// xmlLiteParser->addWarning(generateErrors, S8Printf("Cannot check validity of BiosVersion because ProductName is not set. Dict '%s:%d'.", xmlPath.c_str(), keyPos.getLine()));
}
}
}
@ -530,7 +530,7 @@ public:
{
if ( !ProductName.isDefined() ) {
log_technical_bug("%s : !ProductName.isDefined()", __PRETTY_FUNCTION__);
return iMac132;
return GetDefaultModel();
}
return GetModelFromString(ProductName.value()); // ProductName has been validated, so Model CANNOT be MaxMachineType
}