diff options
| author | Amlal <amlal@zka.com> | 2024-07-23 17:18:32 +0200 |
|---|---|---|
| committer | Amlal <amlal@zka.com> | 2024-07-23 17:18:32 +0200 |
| commit | a4f908c4d3d0c8d5a3578bf81028986405e96937 (patch) | |
| tree | a3a689dba643fc8393d16aed0064b7de1f13d020 /Boot | |
| parent | 274cba18b8f1c255ddcff2f5c14aab4d0c846820 (diff) | |
[MHR-36] Refactors and such.
Signed-off-by: Amlal <amlal@zka.com>
Diffstat (limited to 'Boot')
| -rw-r--r-- | Boot/BootKit/BootKit.hxx | 24 | ||||
| -rw-r--r-- | Boot/Sources/HEL/AMD64/BootMain.cxx | 2 | ||||
| -rw-r--r-- | Boot/amd64-efi.make | 2 |
3 files changed, 14 insertions, 14 deletions
diff --git a/Boot/BootKit/BootKit.hxx b/Boot/BootKit/BootKit.hxx index 1b93bd30..aa9482a2 100644 --- a/Boot/BootKit/BootKit.hxx +++ b/Boot/BootKit/BootKit.hxx @@ -226,7 +226,7 @@ public: fDiskDev.Read(buf, BootDev::kSectorSize); - NewPartitionBlock* blockPart = reinterpret_cast<NewPartitionBlock*>(buf); + NFS_ROOT_PARTITION_BLOCK* blockPart = reinterpret_cast<NFS_ROOT_PARTITION_BLOCK*>(buf); BTextWriter writer; @@ -260,7 +260,7 @@ private: /// @param fileBlobs the blobs. /// @param blobCount the number of blobs to write. /// @param partBlock the NewFS partition block. - Boolean WriteRootCatalog(BFileDescriptor* fileBlobs, SizeT blobCount, NewPartitionBlock& partBlock) + Boolean WriteRootCatalog(BFileDescriptor* fileBlobs, SizeT blobCount, NFS_ROOT_PARTITION_BLOCK& partBlock) { if (partBlock.SectorSize != BootDev::kSectorSize) return false; @@ -269,13 +269,13 @@ private: Lba startLba = partBlock.StartCatalog; BTextWriter writer; - Char bufCatalog[sizeof(NewCatalog)] = {0}; + Char bufCatalog[sizeof(NFS_CATALOG_STRUCT)] = {0}; constexpr auto cNewFSCatalogPadding = 4; - NewCatalog* catalogKind = (NewCatalog*)bufCatalog; + NFS_CATALOG_STRUCT* catalogKind = (NFS_CATALOG_STRUCT*)bufCatalog; catalogKind->PrevSibling = startLba; - catalogKind->NextSibling = (startLba + (sizeof(NewCatalog) * cNewFSCatalogPadding)); + catalogKind->NextSibling = (startLba + (sizeof(NFS_CATALOG_STRUCT) * cNewFSCatalogPadding)); /// Fill catalog kind. catalogKind->Kind = blob->fKind; @@ -293,14 +293,14 @@ private: memcpy(catalogKind->Name, blob->fFileName, strlen(blob->fFileName)); fDiskDev.Leak().mBase = startLba; - fDiskDev.Leak().mSize = sizeof(NewCatalog); + fDiskDev.Leak().mSize = sizeof(NFS_CATALOG_STRUCT); - fDiskDev.Write((Char*)bufCatalog, sizeof(NewCatalog)); + fDiskDev.Write((Char*)bufCatalog, sizeof(NFS_CATALOG_STRUCT)); --partBlock.FreeCatalog; --partBlock.FreeSectors; - memset(bufCatalog, 0, sizeof(NewCatalog)); + memset(bufCatalog, 0, sizeof(NFS_CATALOG_STRUCT)); return true; } @@ -327,7 +327,7 @@ inline Boolean BDiskFormatFactory<BootDev>::Format(const char* partName, SizeT sectorSz = BootDev::kSectorSize; Char buf[BootDev::kSectorSize] = {0}; - NewPartitionBlock* partBlock = reinterpret_cast<NewPartitionBlock*>(buf); + NFS_ROOT_PARTITION_BLOCK* partBlock = reinterpret_cast<NFS_ROOT_PARTITION_BLOCK*>(buf); memcpy(partBlock->Ident, kNewFSIdent, kNewFSIdentLen - 1); memcpy(partBlock->PartitionName, partName, strlen(partName)); @@ -348,7 +348,7 @@ inline Boolean BDiskFormatFactory<BootDev>::Format(const char* partName, partBlock->CatalogCount = blobCount; partBlock->Kind = kNewFSHardDrive; partBlock->SectorSize = sectorSz; - partBlock->FreeCatalog = fDiskDev.GetSectorsCount() / sizeof(NewCatalog); + partBlock->FreeCatalog = fDiskDev.GetSectorsCount() / sizeof(NFS_CATALOG_STRUCT); partBlock->SectorCount = fDiskDev.GetSectorsCount(); partBlock->FreeSectors = fDiskDev.GetSectorsCount(); partBlock->StartCatalog = kNewFSCatalogStartAddress; @@ -366,10 +366,10 @@ inline Boolean BDiskFormatFactory<BootDev>::Format(const char* partName, /// Reset buffer. SetMem(buf, 0, sectorSz); - BootBlockType* epmBoot = (BootBlockType*)buf; + BOOT_BLOCK_STRUCT* epmBoot = (BOOT_BLOCK_STRUCT*)buf; constexpr auto cFsName = "NewFS"; - constexpr auto cBlockName = "Zeta:"; + constexpr auto cBlockName = "ZKA:"; CopyMem(reinterpret_cast<VoidPtr>(const_cast<Char*>(cFsName)), epmBoot->Fs, StrLen(cFsName)); diff --git a/Boot/Sources/HEL/AMD64/BootMain.cxx b/Boot/Sources/HEL/AMD64/BootMain.cxx index 5828e340..3cd6c0e3 100644 --- a/Boot/Sources/HEL/AMD64/BootMain.cxx +++ b/Boot/Sources/HEL/AMD64/BootMain.cxx @@ -20,7 +20,7 @@ // make the compiler shut up. #ifndef kMachineModel -#define kMachineModel "Zeta SSD" +#define kMachineModel "ZKA SSD" #endif // !kMachineModel #ifndef cExpectedWidth diff --git a/Boot/amd64-efi.make b/Boot/amd64-efi.make index b9a4fc1a..f1e40d7a 100644 --- a/Boot/amd64-efi.make +++ b/Boot/amd64-efi.make @@ -21,7 +21,7 @@ EMU=qemu-system-x86_64 endif ifeq ($(NEWS_MODEL), ) -NEWOS_MODEL=-DkMachineModel="\"Zeta SSD\"" +NEWOS_MODEL=-DkMachineModel="\"ZKA SSD\"" endif BIOS=OVMF.fd |
