Do not halt on pointer/drive errors

closes https://github.com/acidanthera/bugtracker/issues/1582
This commit is contained in:
Marvin Häuser 2021-04-02 16:34:05 +02:00
parent 4a91aa1b20
commit a7bbe458b2
2 changed files with 4 additions and 4 deletions

View File

@ -77,9 +77,9 @@ GetVolumeLabel (
// terminating \0 (though they do append it). These drivers must
// not be used, but we try not to die when debugging is off.
//
if (VolumeInfo->VolumeLabel[VolumeLabelSize / sizeof (CHAR16) - 1] != '\0'
|| VolumeLabelSize > OC_MAX_VOLUME_LABEL_SIZE * sizeof (CHAR16)) {
DEBUG ((DEBUG_ERROR, "OCFS: Found unterminated or too long volume label!"));
if (VolumeLabelSize > OC_MAX_VOLUME_LABEL_SIZE * sizeof (CHAR16)
|| VolumeInfo->VolumeLabel[VolumeLabelSize / sizeof (CHAR16) - 1] != '\0') {
DEBUG ((DEBUG_INFO, "OCFS: Found unterminated or too long volume label!"));
FreePool (VolumeInfo);
return AllocateCopyPool (sizeof (L"INVALID"), L"INVALID");
} else {

View File

@ -134,7 +134,7 @@ OcLoadUefiInputSupport (
if (PointerMode != OcInputPointerModeMax) {
Status = OcAppleGenericInputPointerInit (PointerMode);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "OC: Failed to initialize pointer\n"));
DEBUG ((DEBUG_INFO, "OC: Failed to initialize pointer\n"));
} else {
ExitBs = TRUE;
}