Saves Buffer of Length to disk as DirName\\FileName. */
| 746 | |
| 747 | /** Saves Buffer of Length to disk as DirName\\FileName. */ |
| 748 | EFI_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 |
no test coverage detected