diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-04-10 09:45:02 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-10 09:45:02 +0200 |
| commit | 8988b6f166d1087615b21229df651e0bcc0fa048 (patch) | |
| tree | f9a526d927e9b73a588e9c7db5cd99bf1622ca23 /dev/boot/modules/SysChk/SysChk.cc | |
| parent | 29828ef52df7a51e22057b4557b8d9a3d5550839 (diff) | |
| parent | e50f871e6852beacb53986f930ed2d5dead84838 (diff) | |
Merge pull request #13 from amlel-el-mahrouss/dev
dev: Last AHCI patches.
Diffstat (limited to 'dev/boot/modules/SysChk/SysChk.cc')
| -rw-r--r-- | dev/boot/modules/SysChk/SysChk.cc | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/dev/boot/modules/SysChk/SysChk.cc b/dev/boot/modules/SysChk/SysChk.cc index f9af8517..3086cdc6 100644 --- a/dev/boot/modules/SysChk/SysChk.cc +++ b/dev/boot/modules/SysChk/SysChk.cc @@ -21,14 +21,30 @@ #include <BootKit/BootThread.h> #include <modules/CoreGfx/CoreGfx.h> +// Makes the compiler shut up. +#ifndef kMachineModel +#define kMachineModel "Ne" +#endif // !kMachineModel + EXTERN_C Int32 SysChkModuleMain(Kernel::HEL::BootInfoHeader* handover) { -#ifdef __NE_AMD64__ +#ifdef __ATA_PIO__ Boot::BDiskFormatFactory<BootDeviceATA> partition_factory; 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, 1); + + if (partition_factory.IsPartitionValid()) + return kEfiOk; + return kEfiFail; #else return kEfiOk; |
