Use uppercase when printing status codes
This commit is contained in:
parent
109fd094ea
commit
c99bd73dfd
|
@ -50,7 +50,7 @@ BlGetConfigValue(IN CONST PWCHAR ConfigName)
|
|||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Memory allocation failure, return NULL */
|
||||
BlDebugPrint(L"ERROR: Memory allocation failure (Status Code: 0x%lx)\n", Status);
|
||||
BlDebugPrint(L"ERROR: Memory allocation failure (Status Code: 0x%lX)\n", Status);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -148,7 +148,7 @@ BlpLoadConfiguration()
|
|||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to load configuration */
|
||||
BlDebugPrint(L"Failed to load FS0:/EFI/BOOT/XTLDR/XTLDR.INI configuration file (Status Code: 0x%lx)\n", Status);
|
||||
BlDebugPrint(L"Failed to load FS0:/EFI/BOOT/XTLDR/XTLDR.INI configuration file (Status Code: 0x%lX)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -157,7 +157,7 @@ BlpLoadConfiguration()
|
|||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to parse configuration */
|
||||
BlDebugPrint(L"Failed to parse FS0:/EFI/BOOT/XTLDR/XTLDR.INI configuration file (Status Code: 0x%lx)\n", Status);
|
||||
BlDebugPrint(L"Failed to parse FS0:/EFI/BOOT/XTLDR/XTLDR.INI configuration file (Status Code: 0x%lX)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
|
|
@ -235,7 +235,7 @@ BlpInitializeSerialPort(IN ULONG PortNumber,
|
|||
/* Print debug message depending on port settings */
|
||||
if(PortAddress)
|
||||
{
|
||||
BlConsolePrint(L"Initializing serial console at COM port address: 0x%lx\n", PortAddress);
|
||||
BlConsolePrint(L"Initializing serial console at COM port address: 0x%lX\n", PortAddress);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -32,7 +32,7 @@ BlExitBootServices()
|
|||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Memory allocation failure */
|
||||
BlDebugPrint(L"ERROR: Memory allocation failure (Status Code: 0x%lx)\n", Status);
|
||||
BlDebugPrint(L"ERROR: Memory allocation failure (Status Code: 0x%lX)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
|
|
@ -246,7 +246,7 @@ BlLoadModule(IN PWCHAR ModuleName)
|
|||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to load module, print error message and return status code */
|
||||
BlDebugPrint(L"Failed to load dependency module '%S', (Status Code: 0x%lx)\n", DepsData, Status);
|
||||
BlDebugPrint(L"Failed to load dependency module '%S', (Status Code: 0x%lX)\n", DepsData, Status);
|
||||
return STATUS_EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
|
@ -299,7 +299,7 @@ BlLoadModule(IN PWCHAR ModuleName)
|
|||
else
|
||||
{
|
||||
/* Failed to load module */
|
||||
BlDebugPrint(L"ERROR: Unable to load module '%S' (Status Code: 0x%lx)\n", ModuleName, Status);
|
||||
BlDebugPrint(L"ERROR: Unable to load module '%S' (Status Code: 0x%lX)\n", ModuleName, Status);
|
||||
}
|
||||
|
||||
/* Return error status code */
|
||||
|
@ -312,7 +312,7 @@ BlLoadModule(IN PWCHAR ModuleName)
|
|||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to open LoadedImage protocol */
|
||||
BlDebugPrint(L"ERROR: Unable to access module interface (Status Code: 0x%lx)\n", Status);
|
||||
BlDebugPrint(L"ERROR: Unable to access module interface (Status Code: 0x%lX)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -340,7 +340,7 @@ BlLoadModule(IN PWCHAR ModuleName)
|
|||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to start module image */
|
||||
BlDebugPrint(L"ERROR: Failed to start module '%S' (Status Code: 0x%lx)\n", ModuleName, Status);
|
||||
BlDebugPrint(L"ERROR: Failed to start module '%S' (Status Code: 0x%lX)\n", ModuleName, Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -383,7 +383,7 @@ BlLoadModules(IN PWCHAR ModulesList)
|
|||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to load module, print error message and set new return value */
|
||||
BlDebugPrint(L"ERROR: Failed to load module '%S', (Status Code: 0x%lx)\n", Module, Status);
|
||||
BlDebugPrint(L"ERROR: Failed to load module '%S', (Status Code: 0x%lX)\n", Module, Status);
|
||||
ReturnStatus = STATUS_EFI_LOAD_ERROR;
|
||||
}
|
||||
|
||||
|
|
|
@ -139,7 +139,7 @@ BlDisplayBootMenu()
|
|||
if(Status != STATUS_SUCCESS)
|
||||
{
|
||||
/* Failed to boot OS */
|
||||
BlDebugPrint(L"ERROR: Failed to boot '%S' (Status Code: 0x%lx)\n",
|
||||
BlDebugPrint(L"ERROR: Failed to boot '%S' (Status Code: 0x%lX)\n",
|
||||
MenuEntries[HighligtedEntryId].EntryName, Status);
|
||||
BlDisplayErrorDialog(L"XTLDR", L"Failed to startup the selected Operating System.");
|
||||
}
|
||||
|
@ -283,7 +283,7 @@ BlDisplayBootMenu()
|
|||
if(Status != STATUS_SUCCESS)
|
||||
{
|
||||
/* Failed to boot OS */
|
||||
BlDebugPrint(L"ERROR: Failed to boot '%S' (Status Code: 0x%lx)\n",
|
||||
BlDebugPrint(L"ERROR: Failed to boot '%S' (Status Code: 0x%lX)\n",
|
||||
MenuEntries[HighligtedEntryId].EntryName, Status);
|
||||
BlDisplayErrorDialog(L"XTLDR", L"Failed to startup the selected Operating System.");
|
||||
}
|
||||
|
@ -456,7 +456,7 @@ BlDisplayInputDialog(IN PWCHAR Caption,
|
|||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Memory allocation failure, print error message and return */
|
||||
BlDebugPrint(L"ERROR: Memory allocation failure (Status Code: 0x%lx)\n", Status);
|
||||
BlDebugPrint(L"ERROR: Memory allocation failure (Status Code: 0x%lX)\n", Status);
|
||||
BlDisplayErrorDialog(L"XTLDR", L"Failed to allocate memory for input field buffer.");
|
||||
return;
|
||||
}
|
||||
|
@ -1217,7 +1217,7 @@ BlpDrawDialogMessage(IN PXTBL_DIALOG_HANDLE Handle,
|
|||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Memory allocation failure, print debug message and return */
|
||||
BlDebugPrint(L"ERROR: Memory allocation failure (Status Code: 0x%lx)\n", Status);
|
||||
BlDebugPrint(L"ERROR: Memory allocation failure (Status Code: 0x%lX)\n", Status);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ BlEnumerateBlockDevices()
|
|||
Status = BlpDiscoverEfiBlockDevices(&BlockDevices);
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
BlDebugPrint(L"ERROR: Failed to discover EFI block devices (Status Code: 0x%lx)\n", Status);
|
||||
BlDebugPrint(L"ERROR: Failed to discover EFI block devices (Status Code: 0x%lX)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -169,7 +169,7 @@ BlEnumerateBlockDevices()
|
|||
Status = BlAllocateMemoryPool(sizeof(EFI_BLOCK_DEVICE), (PVOID *)&BlockDevice);
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
BlDebugPrint(L"ERROR: Failed to allocate memory pool for block device (Status Code: 0x%lx)\n", Status);
|
||||
BlDebugPrint(L"ERROR: Failed to allocate memory pool for block device (Status Code: 0x%lX)\n", Status);
|
||||
return STATUS_EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
|
@ -305,7 +305,7 @@ BlGetEfiPath(IN PWCHAR SystemPath,
|
|||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to allocate memory, print error message and return status code */
|
||||
BlDebugPrint(L"ERROR: Memory allocation failure (Status Code: 0x%lx)\n", Status);
|
||||
BlDebugPrint(L"ERROR: Memory allocation failure (Status Code: 0x%lX)\n", Status);
|
||||
return STATUS_EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
|
@ -408,7 +408,7 @@ BlGetVolumeDevicePath(IN PWCHAR SystemPath,
|
|||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to parse system path */
|
||||
BlDebugPrint(L"ERROR: Failed to parse system path: '%s' (Status Code: 0x%lx)\n", SystemPath, Status);
|
||||
BlDebugPrint(L"ERROR: Failed to parse system path: '%s' (Status Code: 0x%lX)\n", SystemPath, Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -667,7 +667,7 @@ BlpDiscoverEfiBlockDevices(OUT PLIST_ENTRY BlockDevices)
|
|||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to locate handles */
|
||||
BlDebugPrint(L"ERROR: Failed to locate block devices handles (Status Code: 0x%lx)\n", Status);
|
||||
BlDebugPrint(L"ERROR: Failed to locate block devices handles (Status Code: 0x%lX)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -683,7 +683,7 @@ BlpDiscoverEfiBlockDevices(OUT PLIST_ENTRY BlockDevices)
|
|||
if(Status != STATUS_EFI_SUCCESS || Io == NULL)
|
||||
{
|
||||
/* Failed to open I/O protocol, skip it */
|
||||
BlDebugPrint(L"WARNING: Failed to open EFI Block I/O protocol (Status Code: 0x%lx)\n", Status);
|
||||
BlDebugPrint(L"WARNING: Failed to open EFI Block I/O protocol (Status Code: 0x%lX)\n", Status);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -701,7 +701,7 @@ BlpDiscoverEfiBlockDevices(OUT PLIST_ENTRY BlockDevices)
|
|||
if(Status != STATUS_EFI_SUCCESS || DevicePath == NULL)
|
||||
{
|
||||
/* Device failed to handle DP protocol */
|
||||
BlDebugPrint(L"WARNING: Unable to open DevicePath protocol (Status Code: 0x%lx)\n", Status);
|
||||
BlDebugPrint(L"WARNING: Unable to open DevicePath protocol (Status Code: 0x%lX)\n", Status);
|
||||
EfiSystemTable->BootServices->CloseProtocol(Handles[Index], &IoGuid, EfiImageHandle, NULL);
|
||||
continue;
|
||||
}
|
||||
|
@ -711,7 +711,7 @@ BlpDiscoverEfiBlockDevices(OUT PLIST_ENTRY BlockDevices)
|
|||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Memory allocation failure */
|
||||
BlDebugPrint(L"ERROR: Failed to allocate memory pool for block device (Status Code: 0x%lx)\n", Status);
|
||||
BlDebugPrint(L"ERROR: Failed to allocate memory pool for block device (Status Code: 0x%lX)\n", Status);
|
||||
EfiSystemTable->BootServices->CloseProtocol(Handles[Index], &DevicePathGuid, EfiImageHandle, NULL);
|
||||
EfiSystemTable->BootServices->CloseProtocol(Handles[Index], &IoGuid, EfiImageHandle, NULL);
|
||||
return Status;
|
||||
|
@ -942,7 +942,7 @@ BlpDuplicateDevicePath(IN PEFI_DEVICE_PATH_PROTOCOL DevicePath)
|
|||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to allocate memory */
|
||||
BlDebugPrint(L"ERROR: Failed to allocate memory pool for device path duplicate (Status Code: 0x%lx)\n", Status);
|
||||
BlDebugPrint(L"ERROR: Failed to allocate memory pool for device path duplicate (Status Code: 0x%lX)\n", Status);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -56,9 +56,9 @@ BlInitializeBootLoader()
|
|||
/* Protocol opened successfully, print useful debug information */
|
||||
BlConsolePrint(L"\n---------- BOOTLOADER DEBUG ----------\n"
|
||||
L"Pointer Size : %d\n"
|
||||
L"Image Base Address: 0x%lx\n"
|
||||
L"Image Base Size : 0x%lx\n"
|
||||
L"Image Revision : 0x%lx\n"
|
||||
L"Image Base Address: 0x%lX\n"
|
||||
L"Image Base Size : 0x%lX\n"
|
||||
L"Image Revision : 0x%lX\n"
|
||||
L"--------------------------------------\n",
|
||||
sizeof(PVOID),
|
||||
LoadedImage->ImageBase,
|
||||
|
@ -204,7 +204,7 @@ BlInvokeBootProtocol(IN PLIST_ENTRY OptionsList)
|
|||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to allocate memory, print error message and return status code */
|
||||
BlDebugPrint(L"ERROR: Memory allocation failure (Status Code: 0x%lx)\n", Status);
|
||||
BlDebugPrint(L"ERROR: Memory allocation failure (Status Code: 0x%lX)\n", Status);
|
||||
return STATUS_EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
|
@ -224,7 +224,7 @@ BlInvokeBootProtocol(IN PLIST_ENTRY OptionsList)
|
|||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to find volume */
|
||||
BlDebugPrint(L"ERROR: Failed to find volume device path (Status Code: 0x%lx)\n", Status);
|
||||
BlDebugPrint(L"ERROR: Failed to find volume device path (Status Code: 0x%lX)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -233,7 +233,7 @@ BlInvokeBootProtocol(IN PLIST_ENTRY OptionsList)
|
|||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to get EFI path */
|
||||
BlDebugPrint(L"ERROR: Failed to get EFI path (Status Code: 0x%lx)\n", Status);
|
||||
BlDebugPrint(L"ERROR: Failed to get EFI path (Status Code: 0x%lX)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
}
|
||||
|
@ -267,7 +267,7 @@ BlInvokeBootProtocol(IN PLIST_ENTRY OptionsList)
|
|||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to load modules, print error message and return status code */
|
||||
BlDebugPrint(L"ERROR: Failed to load XTLDR modules (Status Code: 0x%lx)\n", Status);
|
||||
BlDebugPrint(L"ERROR: Failed to load XTLDR modules (Status Code: 0x%lX)\n", Status);
|
||||
return STATUS_EFI_NOT_READY;
|
||||
}
|
||||
|
||||
|
@ -276,7 +276,7 @@ BlInvokeBootProtocol(IN PLIST_ENTRY OptionsList)
|
|||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to get boot protocol GUID */
|
||||
BlDebugPrint(L"ERROR: Unable to find appropriate boot protocol (Status Code: 0x%lx)\n", Status);
|
||||
BlDebugPrint(L"ERROR: Unable to find appropriate boot protocol (Status Code: 0x%lX)\n", Status);
|
||||
return STATUS_EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
|
@ -285,7 +285,7 @@ BlInvokeBootProtocol(IN PLIST_ENTRY OptionsList)
|
|||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to open boot protocol */
|
||||
BlDebugPrint(L"ERROR: Failed to open boot protocol (Status Code: 0x%lx)\n", Status);
|
||||
BlDebugPrint(L"ERROR: Failed to open boot protocol (Status Code: 0x%lX)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -363,7 +363,7 @@ BlStartXtLoader(IN EFI_HANDLE ImageHandle,
|
|||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to disable the timer, print message */
|
||||
BlDebugPrint(L"WARNING: Failed to disable watchdog timer (Status Code: 0x%lx)\n", Status);
|
||||
BlDebugPrint(L"WARNING: Failed to disable watchdog timer (Status Code: 0x%lX)\n", Status);
|
||||
}
|
||||
|
||||
/* Install loader protocol */
|
||||
|
@ -371,7 +371,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 (Status Code: 0x%lx)\n", Status);
|
||||
BlDebugPrint(L"ERROR: Failed to register XTLDR loader protocol (Status Code: 0x%lX)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -380,7 +380,7 @@ BlStartXtLoader(IN EFI_HANDLE ImageHandle,
|
|||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to load modules */
|
||||
BlDebugPrint(L"ERROR: Failed to load XTLDR modules (Status Code: 0x%lx)\n", Status);
|
||||
BlDebugPrint(L"ERROR: Failed to load XTLDR modules (Status Code: 0x%lX)\n", Status);
|
||||
BlDisplayErrorDialog(L"XTLDR", L"Failed to load some XTLDR modules.");
|
||||
}
|
||||
|
||||
|
@ -389,7 +389,7 @@ BlStartXtLoader(IN EFI_HANDLE ImageHandle,
|
|||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to enumerate block devices */
|
||||
BlDebugPrint(L"ERROR: Failed to discover and enumerate block devices (Status Code: 0x%lx)\n", Status);
|
||||
BlDebugPrint(L"ERROR: Failed to discover and enumerate block devices (Status Code: 0x%lX)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue