MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / SaveBufferToDisk

Function SaveBufferToDisk

rEFIt_UEFI/Platform/AcpiPatcher.cpp:748–761  ·  view source on GitHub ↗

Saves Buffer of Length to disk as DirName\\FileName. */

Source from the content-addressed store, hash-verified

746
747/** Saves Buffer of Length to disk as DirName\\FileName. */
748EFI_STATUS SaveBufferToDisk(VOID *Buffer, UINTN Length, CONST CHAR16 *DirName, CONST CHAR16 *FileName)
749{
750 if (DirName == NULL || FileName == NULL) {
751 return EFI_INVALID_PARAMETER;
752 }
753
754 XStringW PathName = SWPrintf("%ls\\%ls", DirName, FileName);
755
756 EFI_STATUS Status = egSaveFile(SelfRootDir, PathName.wc_str(), Buffer, Length);
757 if (EFI_ERROR(Status)) {
758 Status = egSaveFile(NULL, PathName.wc_str(), Buffer, Length);
759 }
760 return Status;
761}
762
763//
764// Remembering saved tables

Callers 5

DumpChildSsdtFunction · 0.85
DumpTableFunction · 0.85
DumpFadtTablesFunction · 0.85
DumpTablesFunction · 0.85
SaveOemTablesFunction · 0.85

Calls 3

SWPrintfFunction · 0.85
egSaveFileFunction · 0.85
wc_strMethod · 0.45

Tested by

no test coverage detected