diff options
| author | Amlal <amlal.elmahrouss@icloud.com> | 2025-02-25 20:06:33 +0100 |
|---|---|---|
| committer | Amlal <amlal.elmahrouss@icloud.com> | 2025-02-25 20:06:33 +0100 |
| commit | ee433f2d1b077b51cf5c551111a7ae394e1c4eb1 (patch) | |
| tree | f49847b9dd8efd9c8d5fba59d2d38a79642e51f7 | |
| parent | 542d6598e623b7d176ae27dd96e860e1572315e7 (diff) | |
ADD: Remove BOOT_BLOCK_STRUCT, replace with EPM_PART_BLOCK.
Signed-off-by: Amlal <amlal.elmahrouss@icloud.com>
| -rw-r--r-- | dev/Boot/BootKit/BootKit.h | 6 | ||||
| -rw-r--r-- | dev/Kernel/FirmwareKit/EPM.h | 4 | ||||
| -rw-r--r-- | dev/Kernel/src/DriveMgr.cc | 2 | ||||
| -rw-r--r-- | dev/Kernel/src/FS/NeFS.cc | 6 |
4 files changed, 8 insertions, 10 deletions
diff --git a/dev/Boot/BootKit/BootKit.h b/dev/Boot/BootKit/BootKit.h index 4e85ace9..aef84a77 100644 --- a/dev/Boot/BootKit/BootKit.h +++ b/dev/Boot/BootKit/BootKit.h @@ -368,7 +368,7 @@ namespace Boot writer << "sector size: " << part.SectorSize << "\n"; #ifdef BOOTZ_EPM_SUPPORT - BOOT_BLOCK_STRUCT epm_boot{0}; + EPM_PART_BLOCK epm_boot{0}; const auto kFsName = "NeFS"; const auto kBlockName = "OS"; @@ -386,9 +386,9 @@ namespace Boot CopyMem(epm_boot.Magic, reinterpret_cast<VoidPtr>(const_cast<Char*>(kEPMMagic)), StrLen(kEPMMagic)); fDiskDev.Leak().mBase = kEPMBootBlockLba; // always always resies at zero block. - fDiskDev.Leak().mSize = sizeof(BOOT_BLOCK_STRUCT); + fDiskDev.Leak().mSize = sizeof(EPM_PART_BLOCK); - fDiskDev.Write((Char*)&epm_boot, sizeof(BOOT_BLOCK_STRUCT)); + fDiskDev.Write((Char*)&epm_boot, sizeof(EPM_PART_BLOCK)); writer.Write(L"BootZ: Drive has been formatted Successfully.\r"); #endif diff --git a/dev/Kernel/FirmwareKit/EPM.h b/dev/Kernel/FirmwareKit/EPM.h index 51def6a9..a6b8c5b6 100644 --- a/dev/Kernel/FirmwareKit/EPM.h +++ b/dev/Kernel/FirmwareKit/EPM.h @@ -91,7 +91,7 @@ struct PACKED EPM_PART_BLOCK NeOS::Int16 Kind; NeOS::Int16 Flags; NeOS::Int32 FsVersion; - NeOS::Char Fs[kEPMFilesystemLength]; /* NeFS, ffs2... */ + NeOS::Char Fs[kEPMFilesystemLength]; /* NeFS, HPFS... */ NeOS::Char Reserved[kEPMReserveLen]; // to fill a full sector. }; @@ -108,6 +108,4 @@ enum kEPMInvalidOS = 0xff, }; -typedef struct EPM_PART_BLOCK BOOT_BLOCK_STRUCT; - #endif // ifndef FIRMWAREKIT_EPM_H diff --git a/dev/Kernel/src/DriveMgr.cc b/dev/Kernel/src/DriveMgr.cc index 2989d85e..5c5f853a 100644 --- a/dev/Kernel/src/DriveMgr.cc +++ b/dev/Kernel/src/DriveMgr.cc @@ -172,7 +172,7 @@ namespace NeOS trait.fInput(trait.fPacket); - if (rt_string_cmp(((BOOT_BLOCK_STRUCT*)trait.fPacket.fPacketContent)->Magic, kEPMMagic, kEPMMagicLength) == 0) + if (rt_string_cmp(((EPM_PART_BLOCK*)trait.fPacket.fPacketContent)->Magic, kEPMMagic, kEPMMagicLength) == 0) { trait.fPacket.fPacketReadOnly = NO; trait.fKind = kMassStorageDrive | kEPMDrive; diff --git a/dev/Kernel/src/FS/NeFS.cc b/dev/Kernel/src/FS/NeFS.cc index 29427a2a..75414245 100644 --- a/dev/Kernel/src/FS/NeFS.cc +++ b/dev/Kernel/src/FS/NeFS.cc @@ -498,7 +498,7 @@ bool NeFileSystemParser::Format(_Input _Output DriveTrait* drive, _Input const L // make it bootable when needed. Char buf_epm[kNeFSSectorSz] = {0}; - BOOT_BLOCK_STRUCT* epm_boot = (BOOT_BLOCK_STRUCT*)buf_epm; + EPM_PART_BLOCK* epm_boot = (EPM_PART_BLOCK*)buf_epm; // Write a new EPM entry. @@ -549,10 +549,10 @@ bool NeFileSystemParser::Format(_Input _Output DriveTrait* drive, _Input const L } else { - prevStart = ((BOOT_BLOCK_STRUCT*)buf)->LbaStart + ((BOOT_BLOCK_STRUCT*)buf)->LbaEnd; + prevStart = ((EPM_PART_BLOCK*)buf)->LbaStart + ((EPM_PART_BLOCK*)buf)->LbaEnd; } - outEpmLba += sizeof(BOOT_BLOCK_STRUCT); + outEpmLba += sizeof(EPM_PART_BLOCK); ++cnt; } } |
