diff --git a/xtldr2/xtldr.c b/xtldr2/xtldr.c index 06d5096..1ea99b4 100644 --- a/xtldr2/xtldr.c +++ b/xtldr2/xtldr.c @@ -42,8 +42,7 @@ BlStartXtLoader(IN EFI_HANDLE ImageHandle, if(Status != STATUS_EFI_SUCCESS) { /* Failed to parse command line options */ - BlConsolePrint(L"ERROR: Failed to parse command line options\n"); - BlSleepExecution(3000); + BlDisplayErrorDialog(L"XTLDR", L"Failed to parse command line parameters."); } /* Attempt to early initialize debug console */ @@ -53,8 +52,7 @@ BlStartXtLoader(IN EFI_HANDLE ImageHandle, if(Status != STATUS_EFI_SUCCESS) { /* Initialization failed, notify user on stdout */ - BlConsolePrint(L"ERROR: Failed to initialize debug console\n"); - BlSleepExecution(3000); + BlDisplayErrorDialog(L"XTLDR", L"Failed to initialize debug console."); } } @@ -63,8 +61,7 @@ BlStartXtLoader(IN EFI_HANDLE ImageHandle, if(Status != STATUS_EFI_SUCCESS) { /* Failed to load/parse config file */ - BlConsolePrint(L"ERROR: Failed to load configuration file\n"); - BlSleepExecution(3000); + BlDisplayErrorDialog(L"XTLDR", L"Failed to load and parse configuration file."); } /* Reinitialize debug console if it was not initialized earlier */ @@ -74,8 +71,7 @@ BlStartXtLoader(IN EFI_HANDLE ImageHandle, if(Status != STATUS_EFI_SUCCESS) { /* Initialization failed, notify user on stdout */ - BlConsolePrint(L"ERROR: Failed to initialize debug console\n"); - BlSleepExecution(3000); + BlDisplayErrorDialog(L"XTLDR", L"Failed to initialize debug console."); } } @@ -92,7 +88,7 @@ BlStartXtLoader(IN EFI_HANDLE ImageHandle, if(Status != STATUS_EFI_SUCCESS) { /* 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 */ @@ -103,9 +99,6 @@ BlStartXtLoader(IN EFI_HANDLE ImageHandle, 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 */ return STATUS_EFI_LOAD_ERROR; }