efi: add log_oom() helper

This commit is contained in:
Lennart Poettering
2019-07-25 17:10:51 +02:00
parent 1aaabb17fd
commit b19fa8126d
2 changed files with 8 additions and 0 deletions
+6
View File
@@ -350,3 +350,9 @@ EFI_STATUS file_read(EFI_FILE_HANDLE dir, const CHAR16 *name, UINTN off, UINTN s
return err;
}
EFI_STATUS log_oom(void) {
Print(L"Out of memory.");
(void) uefi_call_wrapper(BS->Stall, 1, 3 * 1000 * 1000);
return EFI_OUT_OF_RESOURCES;
}
+2
View File
@@ -66,3 +66,5 @@ const EFI_GUID loader_guid;
(ptr) = NULL; \
_ptr_; \
})
EFI_STATUS log_oom(void);