From 7738550a55d6fa79447d0298c53fe6320a3135b2 Mon Sep 17 00:00:00 2001 From: Amlal EL Mahrouss Date: Sun, 23 Jun 2024 09:13:17 +0200 Subject: FIX: Fix BootKit filesystem write, Fs and Name field wasnt written correctly. Signed-off-by: Amlal EL Mahrouss --- Boot/BootKit/BootKit.hxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Boot/BootKit') diff --git a/Boot/BootKit/BootKit.hxx b/Boot/BootKit/BootKit.hxx index 3eeb8633..f24f75b2 100644 --- a/Boot/BootKit/BootKit.hxx +++ b/Boot/BootKit/BootKit.hxx @@ -366,6 +366,7 @@ inline Boolean BDiskFormatFactory::Format(const char* partName, BootBlockType* epmBoot = (BootBlockType*)buf; constexpr auto cFsName = "NewFS"; + constexpr auto cBlockName = "Zeta:"; CopyMem(reinterpret_cast(const_cast(cFsName)), epmBoot->Fs, StrLen(cFsName)); @@ -374,8 +375,8 @@ inline Boolean BDiskFormatFactory::Format(const char* partName, epmBoot->SectorSz = partBlock->SectorSize; epmBoot->NumBlocks = partBlock->CatalogCount; - CopyMem(reinterpret_cast(const_cast("BOOT:")), epmBoot->Name, StrLen("BOOT:")); - CopyMem(reinterpret_cast(const_cast(kEPMMagic)), epmBoot->Magic, StrLen(kEPMMagic)); + CopyMem(epmBoot->Name, reinterpret_cast(const_cast(cBlockName)), StrLen(cBlockName)); + CopyMem(epmBoot->Magic, reinterpret_cast(const_cast(kEPMMagic)), StrLen(kEPMMagic)); BTextWriter writer; writer.Write(L"newosldr: wrote parition.\r"); @@ -384,7 +385,7 @@ inline Boolean BDiskFormatFactory::Format(const char* partName, fDiskDev.Leak().mSize = sectorSz; fDiskDev.Write(buf, sectorSz); - + return true; } else -- cgit v1.2.3