mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-12 09:54:36 +01:00
recheck DSDT length
Signed-off-by: SergeySlice <sergey.slice@gmail.com>
This commit is contained in:
parent
5d91bbe253
commit
30f4fd2d64
@ -2049,6 +2049,9 @@ EFI_STATUS PatchACPI(IN REFIT_VOLUME *Volume, const XString8& OSVersion)
|
||||
// }
|
||||
|
||||
if (gSettings.DebugDSDT) {
|
||||
TableHeader = (EFI_ACPI_DESCRIPTION_HEADER*)(UINTN)FadtPointer->XDsdt;
|
||||
bufferLen = TableHeader->Length;
|
||||
|
||||
DBG("Output DSDT before patch to %ls\\ACPI\\origin\\DSDT-or.aml\n", selfOem.getConfigDirFullPath().wc_str());
|
||||
Status = egSaveFile(&selfOem.getConfigDir(), L"ACPI\\origin\\DSDT-or.aml", (UINT8*)(UINTN)FadtPointer->XDsdt, bufferLen);
|
||||
}
|
||||
|
@ -196,14 +196,15 @@ EFI_STATUS egSaveFile(const EFI_FILE* BaseDir OPTIONAL, IN CONST CHAR16 *FileNam
|
||||
}
|
||||
} else {
|
||||
//to write into existing file we must sure it size larger then our data
|
||||
EFI_FILE_INFO *Info = EfiLibFileInfo(FileHandle);
|
||||
if (Info) {
|
||||
if (Info->FileSize < FileDataLength) {
|
||||
// EFI_FILE_INFO *Info = EfiLibFileInfo(FileHandle);
|
||||
// if (Info) {
|
||||
// if (Info->FileSize < FileDataLength) {
|
||||
// DBG("no old file %s\n", efiStrError(Status));
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
FreePool(Info);
|
||||
}
|
||||
// return EFI_NOT_FOUND;
|
||||
// }
|
||||
// FreePool(Info);
|
||||
// }
|
||||
Status = FileHandle->Delete(FileHandle); //don't write into existing file. Delete it!
|
||||
}
|
||||
|
||||
if (!FileHandle) {
|
||||
|
Loading…
Reference in New Issue
Block a user