https://git.reactos.org/?p=reactos.git;a=commitdiff;h=cbb7ad6f5b34b2d0f07a5…
commit cbb7ad6f5b34b2d0f07a5ff9777cc0d97d8a117b
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Sat Jul 27 09:58:38 2019 +0200
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Thu Aug 15 18:04:57 2019 +0200
[FREELDR] Improve debug output
---
boot/freeldr/freeldr/lib/peloader.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/boot/freeldr/freeldr/lib/peloader.c b/boot/freeldr/freeldr/lib/peloader.c
index cf90eb851e7..bd4e66573d9 100644
--- a/boot/freeldr/freeldr/lib/peloader.c
+++ b/boot/freeldr/freeldr/lib/peloader.c
@@ -287,7 +287,7 @@ WinLdrLoadImage(IN PCHAR FileName,
Status = ArcOpen(FileName, OpenReadOnly, &FileId);
if (Status != ESUCCESS)
{
- WARN("Error while opening '%s', Status: %u\n", FileName,
Status);
+ ERR("ArcOpen(FileName: \"%s\", OpenReadOnly: %u) failed. Status
%u\n", FileName, OpenReadOnly, Status);
return FALSE;
}
@@ -295,7 +295,7 @@ WinLdrLoadImage(IN PCHAR FileName,
Status = ArcRead(FileId, HeadersBuffer, SECTOR_SIZE * 2, &BytesRead);
if (Status != ESUCCESS)
{
- WARN("Error while reading '%s', Status: %u\n", FileName,
Status);
+ ERR("ArcRead(File: '%s') failed. Status: %u\n", FileName,
Status);
UiMessageBox("Error reading from file.");
ArcClose(FileId);
return FALSE;
@@ -305,7 +305,7 @@ WinLdrLoadImage(IN PCHAR FileName,
NtHeaders = RtlImageNtHeader(HeadersBuffer);
if (!NtHeaders)
{
- // Print(L"Error - no NT header found in %s\n", FileName);
+ ERR("No NT header found in \"%s\"\n", FileName);
UiMessageBox("Error - no NT header found.");
ArcClose(FileId);
return FALSE;
@@ -314,7 +314,7 @@ WinLdrLoadImage(IN PCHAR FileName,
/* Ensure this is executable image */
if (((NtHeaders->FileHeader.Characteristics & IMAGE_FILE_EXECUTABLE_IMAGE) ==
0))
{
- // Print(L"Not an executable image %s\n", FileName);
+ ERR("Not an executable image \"%s\"\n", FileName);
UiMessageBox("Not an executable image.");
ArcClose(FileId);
return FALSE;
@@ -336,7 +336,7 @@ WinLdrLoadImage(IN PCHAR FileName,
if (PhysicalBase == NULL)
{
- // Print(L"Failed to alloc pages for image %s\n", FileName);
+ ERR("Failed to alloc %lu bytes for image %s\n",
NtHeaders->OptionalHeader.SizeOfImage, FileName);
UiMessageBox("Failed to alloc pages for image.");
ArcClose(FileId);
return FALSE;
@@ -353,7 +353,7 @@ WinLdrLoadImage(IN PCHAR FileName,
Status = ArcSeek(FileId, &Position, SeekAbsolute);
if (Status != ESUCCESS)
{
- WARN("Error while seeking '%s', Status: %u\n", FileName,
Status);
+ ERR("ArcSeek(File: '%s') failed. Status: 0x%lx\n", FileName,
Status);
UiMessageBox("Error seeking the start of a file.");
ArcClose(FileId);
return FALSE;
@@ -362,7 +362,7 @@ WinLdrLoadImage(IN PCHAR FileName,
Status = ArcRead(FileId, PhysicalBase, NtHeaders->OptionalHeader.SizeOfHeaders,
&BytesRead);
if (Status != ESUCCESS)
{
- WARN("Error while reading '%s', Status: %u\n", FileName,
Status);
+ ERR("ArcRead(File: '%s') failed. Status: %u\n", FileName,
Status);
UiMessageBox("Error reading headers.");
ArcClose(FileId);
return FALSE;