diff options
Diffstat (limited to 'Private/NewBoot')
| -rw-r--r-- | Private/NewBoot/BootKit/BootKit.hxx | 11 | ||||
| -rw-r--r-- | Private/NewBoot/Source/HEL/AMD64/BootMain.cxx | 2 |
2 files changed, 9 insertions, 4 deletions
diff --git a/Private/NewBoot/BootKit/BootKit.hxx b/Private/NewBoot/BootKit/BootKit.hxx index e2e371dd..26c6c755 100644 --- a/Private/NewBoot/BootKit/BootKit.hxx +++ b/Private/NewBoot/BootKit/BootKit.hxx @@ -268,8 +268,11 @@ private: catalogKind->Kind = blob->fKind; /// Allocate fork for blob. - catalogKind->FirstFork = (startLba + sizeof(NewCatalog)); - catalogKind->LastFork = catalogKind->FirstFork; + if (catalogKind->Kind == kNewFSDataForkKind) { + catalogKind->DataFork = (startLba + sizeof(NewCatalog)); + } else { + catalogKind->ResourceFork = (startLba + sizeof(NewCatalog)); + } NewFork* forkKind = new NewFork(); memset(forkKind, 0, sizeof(NewFork)); @@ -284,8 +287,8 @@ private: forkKind->ResourceKind = 0; /// We're the only fork here. - forkKind->NextSibling = catalogKind->FirstFork; - forkKind->PreviousSibling = catalogKind->FirstFork; + forkKind->NextSibling = forkKind->Kind == kNewFSDataForkKind ? catalogKind->DataFork : catalogKind->ResourceFork; + forkKind->PreviousSibling = kNewFSDataForkKind ? catalogKind->DataFork : catalogKind->ResourceFork; forkKind->DataOffset = (startLba + sizeof(NewCatalog) + sizeof(NewFork)); forkKind->DataSize = blob->fBlobSz; diff --git a/Private/NewBoot/Source/HEL/AMD64/BootMain.cxx b/Private/NewBoot/Source/HEL/AMD64/BootMain.cxx index 558bf001..226d5bff 100644 --- a/Private/NewBoot/Source/HEL/AMD64/BootMain.cxx +++ b/Private/NewBoot/Source/HEL/AMD64/BootMain.cxx @@ -170,6 +170,8 @@ EFI_EXTERN_C EFI_API Int Main(EfiHandlePtr ImageHandle, BDiskFormatFactory<BootDeviceATA> diskFormatter; + /// if not formated yet, then format it with the following folders: + /// /, /Boot, /Applications. if (!diskFormatter) { BDiskFormatFactory<BootDeviceATA>::BFileDescriptor rootDesc{0}; |
