Skip to content

Commit

Permalink
exclude debug messages on screen
Browse files Browse the repository at this point in the history
Signed-off-by: SergeySlice <[email protected]>
  • Loading branch information
SergeySlice committed Mar 24, 2022
1 parent d57b9f1 commit 9337508
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 18 deletions.
10 changes: 1 addition & 9 deletions rEFIt_UEFI/Platform/device_inject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
16 changes: 8 additions & 8 deletions rEFIt_UEFI/Settings/ConfigManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion rEFIt_UEFI/refit/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 9337508

Please sign in to comment.