forked from xt-sys/exectos
Properly print status codes
This commit is contained in:
parent
70c66a5d70
commit
a70df7cbf8
@ -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%zX)\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%zX)\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%zX)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -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%zX)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ ChBootSystem(IN PXTBL_BOOT_PARAMETERS Parameters)
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to open a volume, return error code */
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Unable to open boot volume (Status Code: 0x%lX)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Unable to open boot volume (Status Code: 0x%zX)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -60,7 +60,7 @@ ChBootSystem(IN PXTBL_BOOT_PARAMETERS Parameters)
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to open directory */
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Unable to open system boot directory (Status Code: 0x%lX)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Unable to open system boot directory (Status Code: 0x%zX)\n", Status);
|
||||
|
||||
/* Close volume and return error code */
|
||||
XtLdrProtocol->Disk.CloseVolume(DiskHandle);
|
||||
@ -91,7 +91,7 @@ ChBootSystem(IN PXTBL_BOOT_PARAMETERS Parameters)
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to chainload EFI binary, return error code */
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Unable to chainload '%S' (Status Code: 0x%lX)\n",
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Unable to chainload '%S' (Status Code: 0x%zX)\n",
|
||||
Parameters->KernelFile, Status);
|
||||
return Status;
|
||||
}
|
||||
@ -101,7 +101,7 @@ ChBootSystem(IN PXTBL_BOOT_PARAMETERS Parameters)
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to open EFI_LOADED_IMAGE_PROTOCOL, return error code */
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Unable to access binary interface (Status Code: 0x%lX)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Unable to access binary interface (Status Code: 0x%zX)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -146,7 +146,7 @@ FbInitializeDisplay()
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Unable to get current UGA mode */
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Failed to get current UGA mode (Status Code: 0x%lX)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Failed to get current UGA mode (Status Code: 0x%zX)\n", Status);
|
||||
|
||||
/* Close UGA protocol and return error */
|
||||
XtLdrProtocol->Protocol.Close(Handle, &UgaGuid);
|
||||
@ -166,7 +166,7 @@ FbInitializeDisplay()
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Unable to find framebuffer address */
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Failed to get EFI FB address (Status Code: 0x%lX)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Failed to get EFI FB address (Status Code: 0x%zX)\n", Status);
|
||||
|
||||
/* Close UGA protocol and return error */
|
||||
XtLdrProtocol->Protocol.Close(Handle, &UgaGuid);
|
||||
@ -240,7 +240,7 @@ FbpFindFramebufferAddress(OUT PEFI_PHYSICAL_ADDRESS Address)
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to get handles, return error code */
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Failed to get handles (Status Code: 0x%lX)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Failed to get handles (Status Code: 0x%zX)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -252,7 +252,7 @@ FbpFindFramebufferAddress(OUT PEFI_PHYSICAL_ADDRESS Address)
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to open protocol, continue with next handle */
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Failed to open protocol (Status Code: 0x%lX)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Failed to open protocol (Status Code: 0x%zX)\n", Status);
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -261,7 +261,7 @@ FbpFindFramebufferAddress(OUT PEFI_PHYSICAL_ADDRESS Address)
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to read PCI device class */
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Failed to read class (Status Code: 0x%lX)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Failed to read class (Status Code: 0x%zX)\n", Status);
|
||||
|
||||
/* Close protocol and continue with next handle */
|
||||
XtLdrProtocol->Protocol.Close(Handles[Index], &PciIoGuid);
|
||||
|
@ -246,7 +246,7 @@ PeLoadImage(IN PEFI_FILE_HANDLE FileHandle,
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Memory allocation failure */
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Memory allocation failure (Status Code: 0x%lX)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Memory allocation failure (Status Code: 0x%zX)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -260,7 +260,7 @@ PeLoadImage(IN PEFI_FILE_HANDLE FileHandle,
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Memory allocation failure */
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Memory allocation failure (Status Code: 0x%lX)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Memory allocation failure (Status Code: 0x%zX)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -270,7 +270,7 @@ PeLoadImage(IN PEFI_FILE_HANDLE FileHandle,
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Unable to get file information */
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Failed to get PE/COFF file information (Status Code: 0x%lX)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Failed to get PE/COFF file information (Status Code: 0x%zX)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -279,7 +279,7 @@ PeLoadImage(IN PEFI_FILE_HANDLE FileHandle,
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Memory allocation failure */
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Memory allocation failure (Status Code: 0x%lX)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Memory allocation failure (Status Code: 0x%zX)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -297,7 +297,7 @@ PeLoadImage(IN PEFI_FILE_HANDLE FileHandle,
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Pages allocation failure */
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Pages allocation failure (Status Code: 0x%lX)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Pages allocation failure (Status Code: 0x%zX)\n", Status);
|
||||
XtLdrProtocol->Memory.FreePool(ImageData);
|
||||
return Status;
|
||||
}
|
||||
@ -309,7 +309,7 @@ PeLoadImage(IN PEFI_FILE_HANDLE FileHandle,
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to read data */
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Failed to read PE/COFF image file (Status Code: 0x%lX)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Failed to read PE/COFF image file (Status Code: 0x%zX)\n", Status);
|
||||
XtLdrProtocol->Memory.FreePages(Pages, (EFI_PHYSICAL_ADDRESS)(UINT_PTR)Data);
|
||||
XtLdrProtocol->Memory.FreePool(ImageData);
|
||||
return Status;
|
||||
@ -324,7 +324,7 @@ PeLoadImage(IN PEFI_FILE_HANDLE FileHandle,
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Header validation failed, probably broken or invalid PE/COFF image */
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Invalid PE/COFF image headers (Status Code: 0x%lX)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Invalid PE/COFF image headers (Status Code: 0x%zX)\n", Status);
|
||||
XtLdrProtocol->Memory.FreePages(Pages, (EFI_PHYSICAL_ADDRESS)(UINT_PTR)Data);
|
||||
XtLdrProtocol->Memory.FreePool(ImageData);
|
||||
return Status;
|
||||
@ -349,7 +349,7 @@ PeLoadImage(IN PEFI_FILE_HANDLE FileHandle,
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Pages reallocation failure */
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Pages reallocation failure (Status Code: 0x%lX)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: Pages reallocation failure (Status Code: 0x%zX)\n", Status);
|
||||
XtLdrProtocol->Memory.FreePool(ImageData);
|
||||
return Status;
|
||||
}
|
||||
@ -415,7 +415,7 @@ PeLoadImage(IN PEFI_FILE_HANDLE FileHandle,
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to relocate image */
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: PE/COFF image relocation failed (Status Code: 0x%lX)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"ERROR: PE/COFF image relocation failed (Status Code: 0x%zX)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -298,7 +298,7 @@ XtpBootSequence(IN PEFI_FILE_HANDLE BootDir,
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to setup kernel initialization block */
|
||||
XtLdrProtocol->Debug.Print(L"Failed to initialize APIC (Status Code: %lX)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"Failed to initialize APIC (Status Code: 0x%zX)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -310,7 +310,7 @@ XtpBootSequence(IN PEFI_FILE_HANDLE BootDir,
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to setup kernel initialization block */
|
||||
XtLdrProtocol->Debug.Print(L"Failed to setup kernel initialization block (Status Code: %lX)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"Failed to setup kernel initialization block (Status Code: 0x%zX)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -326,7 +326,7 @@ XtpBootSequence(IN PEFI_FILE_HANDLE BootDir,
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to enable paging */
|
||||
XtLdrProtocol->Debug.Print(L"Failed to enable paging (Status Code: %lX)\n", Status);
|
||||
XtLdrProtocol->Debug.Print(L"Failed to enable paging (Status Code: 0x%zX)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
@ -581,7 +581,7 @@ XtpLoadModule(IN PEFI_FILE_HANDLE SystemDir,
|
||||
}
|
||||
|
||||
/* Print debug message */
|
||||
XtLdrProtocol->Debug.Print(L"Loaded %S at PA: %p, VA: %p\n", FileName,
|
||||
XtLdrProtocol->Debug.Print(L"Loaded %S at PA: %P, VA: %P\n", FileName,
|
||||
(*ImageContext)->PhysicalAddress, (*ImageContext)->VirtualAddress);
|
||||
|
||||
/* Return success */
|
||||
|
@ -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%zX)\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%zX)\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%zX)\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%zX)\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%zX)\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%zX)\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%zX)\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%zX)\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%zX)\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%zX)\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%zX)\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%zX)\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%zX)\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%zX)\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%zX)\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%zX)\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%zX)\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%zX)\n", Status);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ 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 Address: %P\n"
|
||||
L"Image Base Size : 0x%lX\n"
|
||||
L"Image Revision : 0x%lX\n"
|
||||
L"--------------------------------------\n",
|
||||
@ -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%zX)\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%zX)\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%zX)\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%zX)\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%zX)\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%zX)\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%zX)\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%zX)\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%zX)\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%zX)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user