Make a use of TUI dialogs to inform user about errors
All checks were successful
Builds / ExectOS (amd64) (push) Successful in 26s
Builds / ExectOS (i686) (push) Successful in 26s

This commit is contained in:
Rafal Kupiec 2023-12-18 23:22:54 +01:00
parent ebf95ba90a
commit 6983b2eeac
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4

View File

@ -42,8 +42,7 @@ BlStartXtLoader(IN EFI_HANDLE ImageHandle,
if(Status != STATUS_EFI_SUCCESS) if(Status != STATUS_EFI_SUCCESS)
{ {
/* Failed to parse command line options */ /* Failed to parse command line options */
BlConsolePrint(L"ERROR: Failed to parse command line options\n"); BlDisplayErrorDialog(L"XTLDR", L"Failed to parse command line parameters.");
BlSleepExecution(3000);
} }
/* Attempt to early initialize debug console */ /* Attempt to early initialize debug console */
@ -53,8 +52,7 @@ BlStartXtLoader(IN EFI_HANDLE ImageHandle,
if(Status != STATUS_EFI_SUCCESS) if(Status != STATUS_EFI_SUCCESS)
{ {
/* Initialization failed, notify user on stdout */ /* Initialization failed, notify user on stdout */
BlConsolePrint(L"ERROR: Failed to initialize debug console\n"); BlDisplayErrorDialog(L"XTLDR", L"Failed to initialize debug console.");
BlSleepExecution(3000);
} }
} }
@ -63,8 +61,7 @@ BlStartXtLoader(IN EFI_HANDLE ImageHandle,
if(Status != STATUS_EFI_SUCCESS) if(Status != STATUS_EFI_SUCCESS)
{ {
/* Failed to load/parse config file */ /* Failed to load/parse config file */
BlConsolePrint(L"ERROR: Failed to load configuration file\n"); BlDisplayErrorDialog(L"XTLDR", L"Failed to load and parse configuration file.");
BlSleepExecution(3000);
} }
/* Reinitialize debug console if it was not initialized earlier */ /* Reinitialize debug console if it was not initialized earlier */
@ -74,8 +71,7 @@ BlStartXtLoader(IN EFI_HANDLE ImageHandle,
if(Status != STATUS_EFI_SUCCESS) if(Status != STATUS_EFI_SUCCESS)
{ {
/* Initialization failed, notify user on stdout */ /* Initialization failed, notify user on stdout */
BlConsolePrint(L"ERROR: Failed to initialize debug console\n"); BlDisplayErrorDialog(L"XTLDR", L"Failed to initialize debug console.");
BlSleepExecution(3000);
} }
} }
@ -92,7 +88,7 @@ BlStartXtLoader(IN EFI_HANDLE ImageHandle,
if(Status != STATUS_EFI_SUCCESS) if(Status != STATUS_EFI_SUCCESS)
{ {
/* Failed to register loader protocol */ /* Failed to register loader protocol */
BlDebugPrint(L"ERROR: Failed to register XTLDR loader protocol\n"); BlDebugPrint(L"ERROR: Failed to register XTLDR boot protocol\n");
} }
/* Discover and enumerate EFI block devices */ /* Discover and enumerate EFI block devices */
@ -103,9 +99,6 @@ BlStartXtLoader(IN EFI_HANDLE ImageHandle,
BlDebugPrint(L"ERROR: Failed to discover and enumerate block devices\n"); BlDebugPrint(L"ERROR: Failed to discover and enumerate block devices\n");
} }
/* Temporary infinite loop */
for(;;);
/* This point should be never reached, if this happen return error code */ /* This point should be never reached, if this happen return error code */
return STATUS_EFI_LOAD_ERROR; return STATUS_EFI_LOAD_ERROR;
} }