diff options
Diffstat (limited to 'dev/boot/modules')
| -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; |
