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/Kernel/SystemKit/SwapDisk.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'dev/Kernel/SystemKit') diff --git a/dev/Kernel/SystemKit/SwapDisk.h b/dev/Kernel/SystemKit/SwapDisk.h index e46b57ea..b902c5e4 100644 --- a/dev/Kernel/SystemKit/SwapDisk.h +++ b/dev/Kernel/SystemKit/SwapDisk.h @@ -18,7 +18,7 @@ namespace NeOS { - struct SwapDiskHdr; + struct SWAP_DISK_HEADER; /// @brief This class is a disk swap delegate for any data. available as a syscall too. class SwapDisk final @@ -29,11 +29,11 @@ namespace NeOS NE_COPY_DEFAULT(SwapDisk); - BOOL Write(const Char* fork_name, const SizeT fork_name_len, SwapDiskHdr* data, const SizeT data_len); - SwapDiskHdr* Read(const Char* fork_name, const SizeT fork_name_len, const SizeT data_len); + BOOL Write(const Char* fork_name, const SizeT fork_name_len, SWAP_DISK_HEADER* data, const SizeT data_len); + SWAP_DISK_HEADER* Read(const Char* fork_name, const SizeT fork_name_len, const SizeT data_len); }; - typedef struct SwapDiskHdr + typedef struct SWAP_DISK_HEADER { UInt32 fMagic; SizeT fHeaderSz; @@ -42,7 +42,5 @@ namespace NeOS UInt64 fVirtualAddress; SizeT fBlobSz; Char fBlob[]; - } PACKED SwapDiskHdr; - - typedef SwapDiskHdr* SwapDiskHdrRef; + } PACKED SWAP_DISK_HEADER; } // namespace NeOS -- cgit v1.2.3