diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-07-09 20:51:20 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-07-09 20:52:00 +0200 |
| commit | dfaf137915094e7ba72f7d7f1f57dc5158d1b6ab (patch) | |
| tree | 802a5bf263d606b59bb52d5e7434a04c8644d07e /Boot/Sources/HEL/AMD64/BootFileReader.cxx | |
| parent | 891245c6c9a78cea6074e336d1b04a2264b2fcce (diff) | |
MHR-36: A set of major fixes for bootloader and kernel alongside new
implementations.
- Implement realloc for kernel scheduler improvements.
- Fixed readAll on bootloader's BFileReader.
- Add resources for zeta installation.
- Add STB header.
- Process Heap which replaced the previous User Heap.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Boot/Sources/HEL/AMD64/BootFileReader.cxx')
| -rw-r--r-- | Boot/Sources/HEL/AMD64/BootFileReader.cxx | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/Boot/Sources/HEL/AMD64/BootFileReader.cxx b/Boot/Sources/HEL/AMD64/BootFileReader.cxx index d32f2a17..f5e0a55b 100644 --- a/Boot/Sources/HEL/AMD64/BootFileReader.cxx +++ b/Boot/Sources/HEL/AMD64/BootFileReader.cxx @@ -48,7 +48,7 @@ BFileReader::BFileReader(const CharacterTypeUTF16* path, EfiGUID guidEfp = EfiGUID(EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID); - EfiSimpleFilesystemProtocol* efp = nullptr; + EfiSimpleFilesystemProtocol* efp = nullptr; EfiLoadImageProtocol* img = nullptr; EfiGUID guidImg = EfiGUID(EFI_LOADED_IMAGE_PROTOCOL_GUID); @@ -84,7 +84,7 @@ BFileReader::BFileReader(const CharacterTypeUTF16* path, .Write(mPath) .Write(L"\r"); this->mErrorCode = kNotSupported; - + mRootFs->Close(mRootFs); return; @@ -147,11 +147,18 @@ Void BFileReader::ReadAll(SizeT readUntil, SizeT chunkToRead) szCnt += bufSize; if (res == kBufferTooSmall) - bufSize = chunkToRead; + { + mErrorCode = kTooSmall; + return; + } else if (res == kEfiOk) - bufSize = chunkToRead; + { + continue; + } else + { break; + } } mSizeFile = szCnt; |
