From 1c43fb19cab6eb1121a6d41f4bbe180229a3ae9e Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Thu, 20 Mar 2025 20:30:18 +0100 Subject: Refactored BootKit and DiskImage framework, minor kernel fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Refactored BootKit classes: - Renamed `BTextWriter` → `BootTextWriter` - Renamed `BFileReader` → `BootFileReader` - Improved consistency across `BootKit.h`, `BootThread.cc`, and related files. - Updated NetBoot module: - Standardized text writer usage. - Improved error handling for missing patches and EEPROM flash. - DiskImage framework improvements: - Introduced `DI_DISK_IMAGE` struct. - Added new `DIFormatDisk()` and `DIFormatNeFS()` functions. - Improved error handling and structure alignment. - Kernel enhancements: - Updated PE loader structures for better readability. - Renamed PE header fields for consistency. - Improved SwapDisk API structure (`SwapDiskHdr` → `SWAP_DISK_HEADER`). Signed-off-by: Amlal El Mahrouss --- dev/Boot/src/BootFileReader.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'dev/Boot/src/BootFileReader.cc') diff --git a/dev/Boot/src/BootFileReader.cc b/dev/Boot/src/BootFileReader.cc index 80ae46a2..4712374e 100644 --- a/dev/Boot/src/BootFileReader.cc +++ b/dev/Boot/src/BootFileReader.cc @@ -22,7 +22,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// /// /// -/// @name BFileReader class +/// @name BootFileReader class /// @brief Reads the file as a blob. /// /// @@ -31,8 +31,8 @@ /*** @brief File Reader constructor. */ -Boot::BFileReader::BFileReader(const CharacterTypeUTF16* path, - EfiHandlePtr ImageHandle) +Boot::BootFileReader::BootFileReader(const CharacterTypeUTF16* path, + EfiHandlePtr ImageHandle) { if (path != nullptr) { @@ -98,7 +98,7 @@ Boot::BFileReader::BFileReader(const CharacterTypeUTF16* path, mErrorCode = kOperationOkay; } -Boot::BFileReader::~BFileReader() +Boot::BootFileReader::~BootFileReader() { if (this->mFile) { @@ -126,7 +126,7 @@ Boot::BFileReader::~BFileReader() @param **readUntil** size of file @param **chunkToRead** chunk to read each time. */ -Void Boot::BFileReader::ReadAll(SizeT readUntil, SizeT chunkToRead, UIntPtr out_address) +Void Boot::BootFileReader::ReadAll(SizeT readUntil, SizeT chunkToRead, UIntPtr out_address) { UInt32 szInfo = sizeof(EfiFileInfo); @@ -186,21 +186,21 @@ Void Boot::BFileReader::ReadAll(SizeT readUntil, SizeT chunkToRead, UIntPtr out_ /// @brief error code getter. /// @return the error code. -Int32& Boot::BFileReader::Error() +Int32& Boot::BootFileReader::Error() { return mErrorCode; } /// @brief blob getter. /// @return the blob. -VoidPtr Boot::BFileReader::Blob() +VoidPtr Boot::BootFileReader::Blob() { return mBlob; } /// @breif Size getter. /// @return the size of the file. -UInt64& Boot::BFileReader::Size() +UInt64& Boot::BootFileReader::Size() { return mSizeFile; } -- cgit v1.2.3