diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-04-08 14:17:29 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-04-08 14:17:29 +0200 |
| commit | ed7987748e6d55fb17cd965f4eb2abf948c1f81a (patch) | |
| tree | 4498a91b9d49ee07d8e3b1648f3aa9b876313d8f /dev/boot/modules/SysChk | |
| parent | 6dfe91e2f6d91011c57e0dd0858a7907f35bb71b (diff) | |
boot: urgent nekernel patches.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/boot/modules/SysChk')
| -rw-r--r-- | dev/boot/modules/SysChk/SysChk.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/dev/boot/modules/SysChk/SysChk.cc b/dev/boot/modules/SysChk/SysChk.cc index f9af8517..471b89a4 100644 --- a/dev/boot/modules/SysChk/SysChk.cc +++ b/dev/boot/modules/SysChk/SysChk.cc @@ -21,6 +21,11 @@ #include <BootKit/BootThread.h> #include <modules/CoreGfx/CoreGfx.h> +// Makes the compiler shut up. +#ifndef kMachineModel +#define kMachineModel "NeKrnl" +#endif // !kMachineModel + EXTERN_C Int32 SysChkModuleMain(Kernel::HEL::BootInfoHeader* handover) { #ifdef __NE_AMD64__ @@ -29,6 +34,17 @@ EXTERN_C Int32 SysChkModuleMain(Kernel::HEL::BootInfoHeader* handover) if (partition_factory.IsPartitionValid()) return kEfiOk; + Boot::BDiskFormatFactory<BootDeviceATA>::BFileDescriptor desc{}; + + desc.fFileName[0] = '/'; + desc.fFileName[1] = 0; + desc.fKind = kNeFSCatalogKindDir; + + partition_factory.Format(kMachineModel, &desc, sizeof(Boot::BDiskFormatFactory<BootDeviceATA>::BFileDescriptor)); + + if (partition_factory.IsPartitionValid()) + return kEfiOk; + return kEfiFail; #else return kEfiOk; |
