From eb5271c14e02aab956ab53f5e74290bca495e2ff Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sat, 28 Dec 2024 05:03:47 +0100 Subject: See details of commit. IMPL: Better Bootloader architecture. FIX: Remove overcomplicated FbMgr code. IMPL: Implement the SwapMgrDisk function to dump process data to disk. FIX: Fix the format system in Boot. Signed-off-by: Amlal El Mahrouss --- dev/Boot/Mod/SysChk/Module.cc | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) (limited to 'dev/Boot/Mod/SysChk/Module.cc') diff --git a/dev/Boot/Mod/SysChk/Module.cc b/dev/Boot/Mod/SysChk/Module.cc index a48e524c..e51eabef 100644 --- a/dev/Boot/Mod/SysChk/Module.cc +++ b/dev/Boot/Mod/SysChk/Module.cc @@ -21,27 +21,12 @@ #include #include -EXTERN_C Int32 ModuleMain(Kernel::HEL::BootInfoHeader* Handover) +EXTERN_C Int32 ModuleMain(Kernel::HEL::BootInfoHeader* handover) { - EfiSystemTable* system_table = (EfiSystemTable*)Handover->f_FirmwareCustomTables[1]; + if (!handover) + return kEfiFail; - EfiInputKey key{}; - - system_table->ConIn->ReadKeyStroke(system_table->ConIn, &key); - - if (key.UnicodeChar == 'F' || - key.UnicodeChar == 'f') - { - UI::ui_draw_background(); - - fb_init(); - - FBDrawBitMapInRegion(zka_no_disk, ZKA_NO_DISK_HEIGHT, ZKA_NO_DISK_WIDTH, (kHandoverHeader->f_GOP.f_Width - ZKA_NO_DISK_WIDTH) / 2, (kHandoverHeader->f_GOP.f_Height - ZKA_NO_DISK_HEIGHT) / 2); - - fb_fini(); - - return kEfiOk; - } - - return kEfiFail; + Boot::BDiskFormatFactory partition_factory; + + return !partition_factory.IsPartitionValid() ? kEfiOk : kEfiFail; } -- cgit v1.2.3