summaryrefslogtreecommitdiffhomepage
path: root/Private/NewBoot/Source/FileReader.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Private/NewBoot/Source/FileReader.cxx')
-rw-r--r--Private/NewBoot/Source/FileReader.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/Private/NewBoot/Source/FileReader.cxx b/Private/NewBoot/Source/FileReader.cxx
index 193184c4..16197164 100644
--- a/Private/NewBoot/Source/FileReader.cxx
+++ b/Private/NewBoot/Source/FileReader.cxx
@@ -86,7 +86,7 @@ BFileReader::BFileReader(const CharacterType* path, EfiHandlePtr ImageHandle) {
mSizeFile = 0;
mFile = kernelFile;
- mErrorCode = kNotSupported;
+ mErrorCode = kOperationOkay;
}
BFileReader::~BFileReader() {
@@ -107,6 +107,8 @@ BFileReader::~BFileReader() {
Void BFileReader::ReadAll() {
/// Allocate Handover page.
+ if (this->mErrorCode != kOperationOkay) return;
+
if (mBlob == nullptr) {
UInt8* blob = (UInt8*)hTransferBufferAddress;