exclude debug messages on screen

Signed-off-by: SergeySlice <sergey.slice@gmail.com>
This commit is contained in:
SergeySlice 2022-03-24 20:32:31 +03:00
parent d57b9f1e52
commit 9337508928
3 changed files with 10 additions and 18 deletions

View File

@ -344,15 +344,7 @@ XBuffer<char> devprop_generate_string(DevPropString *StringBuf)
for(UINT32 x = 0; x < (StringBuf->entries[i]->length) - (24 + (6 * StringBuf->entries[i]->num_pci_devpaths)); x++) {
buffer.S8Catf("%02hhX", *dataptr++);
}
//try to find same devices
for (int j=i+1; j < StringBuf->numentries; j++) {
if (!SameDevice(StringBuf->entries[i], StringBuf->entries[j])) continue;
dataptr = StringBuf->entries[j]->data;
for (UINT32 x = 0; x < (StringBuf->entries[j]->length) - (24 + (6 * StringBuf->entries[j]->num_pci_devpaths)); x++) {
buffer.S8Catf("%02hhX", *dataptr++);
}
StringBuf->entries[j]->data = NULL;
}
}
// DBG("string=%s\n", buffer.data());
return buffer;

View File

@ -527,28 +527,28 @@ EFI_STATUS LoadPlist(const XStringW& ConfName, C* plist)
XBool parsingOk = plist->parse((const CHAR8*)ConfigPtr, Size, ""_XS8, &xmlLiteParser);
if ( xmlLiteParser.getXmlParserMessageArray().size() - xmlLiteParser.getXmlParserInfoMessageCount() > 0 ) {
if ( xmlLiteParser.getXmlParserMessageArray().size() - xmlLiteParser.getXmlParserInfoMessageCount() > 1 ) {
DebugLog(2, "There are problems in plist '%ls'\n", configPlistPath.wc_str());
DebugLog(1, "There are problems in plist '%ls'\n", configPlistPath.wc_str());
}else{
DebugLog(2, "There is a problem in plist '%ls'\n", configPlistPath.wc_str());
DebugLog(1, "There is a problem in plist '%ls'\n", configPlistPath.wc_str());
}
for ( size_t idx = 0 ; idx < xmlLiteParser.getXmlParserMessageArray().size() ; idx++ ) {
const XmlParserMessage& xmlMsg = xmlLiteParser.getXmlParserMessageArray()[idx];
if ( xmlMsg.type != XmlParserMessageType::info ) {
DebugLog(2, "%s\n", xmlMsg.getFormattedMsg().c_str());
DebugLog(1, "%s\n", xmlMsg.getFormattedMsg().c_str());
}
}
DebugLog(2, "Use CloverConfigPlistValidator");
DebugLog(1, "Use CloverConfigPlistValidator");
if ( plist->getSMBIOS().dgetModel() < MaxMacModel ) {
if ( xmlLiteParser.productNameNeeded ) DebugLog(2, " (with --productname=%s)", MachineModelName[plist->getSMBIOS().dgetModel()].c_str());
if ( xmlLiteParser.productNameNeeded ) DebugLog(1, " (with --productname=%s)", MachineModelName[plist->getSMBIOS().dgetModel()].c_str());
}else{
// This is NOT supposed to happen, since CLover set a default mac model
// If a default mac model is not set, a crash would probably happen earlier, but who knows
if ( xmlLiteParser.productNameNeeded ) DebugLog(2, "(with --productname=?)");
if ( xmlLiteParser.productNameNeeded ) DebugLog(1, "(with --productname=?)");
}
DebugLog(2, " or look in the log\n");
DebugLog(1, " or look in the log\n");
}
if ( !parsingOk ) {
DebugLog(2, "Parsing error while parsing '%ls'.\n", configPlistPath.wc_str());
DebugLog(1, "Parsing error while parsing '%ls'.\n", configPlistPath.wc_str());
Status = EFI_LOAD_ERROR;
}

View File

@ -3037,7 +3037,7 @@ RefitMain (IN EFI_HANDLE ImageHandle,
//Now we have to reinit handles
Status = ReinitRefitLib();
if (EFI_ERROR(Status)){
DebugLog(2, " %s", efiStrError(Status));
// DebugLog(2, " %s", efiStrError(Status));
PauseForKey("Error reinit refit."_XS8);
#ifdef ENABLE_SECURE_BOOT
UninstallSecureBoot();