From: "Michael D Kinney" <michael.d.kinney@intel.com>
To: devel@edk2.groups.io
Cc: Jordan Justen <jordan.l.justen@intel.com>,
Ray Ni <ray.ni@intel.com>, Andrew Fish <afish@apple.com>,
Tim Lewis <tim.lewis@insyde.com>
Subject: [Patch][edk2-stable201908 2/2] EmulatorPkg/Win/Host: Fix SecPrint() log line endings
Date: Wed, 21 Aug 2019 19:36:10 -0700 [thread overview]
Message-ID: <20190822023610.2068-3-michael.d.kinney@intel.com> (raw)
In-Reply-To: <20190822023610.2068-1-michael.d.kinney@intel.com>
Update use of SecPrint() to consistently use \n\r for
line endings to fix formatting issues in the debug log.
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Andrew Fish <afish@apple.com>
Cc: Tim Lewis <tim.lewis@insyde.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
EmulatorPkg/Win/Host/WinHost.c | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/EmulatorPkg/Win/Host/WinHost.c b/EmulatorPkg/Win/Host/WinHost.c
index 9c6acac279..9aba3c8959 100644
--- a/EmulatorPkg/Win/Host/WinHost.c
+++ b/EmulatorPkg/Win/Host/WinHost.c
@@ -408,7 +408,7 @@ Returns:
MemorySizeStr = (CHAR16 *) PcdGetPtr (PcdEmuMemorySize);
FirmwareVolumesStr = (CHAR16 *) PcdGetPtr (PcdEmuFirmwareVolume);
- SecPrint ("\nEDK II WIN Host Emulation Environment from http://www.tianocore.org/edk2/\n");
+ SecPrint ("\n\rEDK II WIN Host Emulation Environment from http://www.tianocore.org/edk2/\n\r");
//
// Determine the first thread available to this process.
@@ -450,7 +450,7 @@ Returns:
gSystemMemoryCount = CountSeparatorsInString (MemorySizeStr, '!') + 1;
gSystemMemory = calloc (gSystemMemoryCount, sizeof (NT_SYSTEM_MEMORY));
if (gSystemMemory == NULL) {
- SecPrint ("ERROR : Can not allocate memory for %S. Exiting.\n", MemorySizeStr);
+ SecPrint ("ERROR : Can not allocate memory for %S. Exiting.\n\r", MemorySizeStr);
exit (1);
}
@@ -460,13 +460,13 @@ Returns:
gFdInfoCount = CountSeparatorsInString (FirmwareVolumesStr, '!') + 1;
gFdInfo = calloc (gFdInfoCount, sizeof (NT_FD_INFO));
if (gFdInfo == NULL) {
- SecPrint ("ERROR : Can not allocate memory for %S. Exiting.\n", FirmwareVolumesStr);
+ SecPrint ("ERROR : Can not allocate memory for %S. Exiting.\n\r", FirmwareVolumesStr);
exit (1);
}
//
// Setup Boot Mode.
//
- SecPrint (" BootMode 0x%02x\n", PcdGet32 (PcdEmuBootMode));
+ SecPrint (" BootMode 0x%02x\n\r", PcdGet32 (PcdEmuBootMode));
//
// Allocate 128K memory to emulate temp memory for PEI.
@@ -476,12 +476,12 @@ Returns:
TemporaryRamSize = TEMPORARY_RAM_SIZE;
TemporaryRam = VirtualAlloc (NULL, (SIZE_T) (TemporaryRamSize), MEM_COMMIT, PAGE_EXECUTE_READWRITE);
if (TemporaryRam == NULL) {
- SecPrint ("ERROR : Can not allocate enough space for SecStack\n");
+ SecPrint ("ERROR : Can not allocate enough space for SecStack\n\r");
exit (1);
}
SetMem32 (TemporaryRam, TemporaryRamSize, PcdGet32 (PcdInitValueInTempStack));
- SecPrint (" OS Emulator passing in %u KB of temp RAM at 0x%08lx to SEC\n",
+ SecPrint (" OS Emulator passing in %u KB of temp RAM at 0x%08lx to SEC\n\r",
TemporaryRamSize / SIZE_1KB,
TemporaryRam
);
@@ -503,7 +503,7 @@ Returns:
&Size
);
if (EFI_ERROR (Status)) {
- SecPrint ("ERROR : Could not allocate PeiServicesTablePage @ %p\n", EmuMagicPage);
+ SecPrint ("ERROR : Could not allocate PeiServicesTablePage @ %p\n\r", EmuMagicPage);
return EFI_DEVICE_ERROR;
}
}
@@ -514,7 +514,7 @@ Returns:
//
FileNamePtr = AllocateCopyPool (StrSize (FirmwareVolumesStr), FirmwareVolumesStr);
if (FileNamePtr == NULL) {
- SecPrint ("ERROR : Can not allocate memory for firmware volume string\n");
+ SecPrint ("ERROR : Can not allocate memory for firmware volume string\n\r");
exit (1);
}
@@ -540,11 +540,11 @@ Returns:
&gFdInfo[Index].Size
);
if (EFI_ERROR (Status)) {
- SecPrint ("ERROR : Can not open Firmware Device File %S (0x%X). Exiting.\n", FileName, Status);
+ SecPrint ("ERROR : Can not open Firmware Device File %S (0x%X). Exiting.\n\r", FileName, Status);
exit (1);
}
- SecPrint (" FD loaded from %S\n", FileName);
+ SecPrint (" FD loaded from %S", FileName);
if (SecFile == NULL) {
//
@@ -565,7 +565,7 @@ Returns:
}
}
- SecPrint ("\n");
+ SecPrint ("\n\r");
}
//
// Calculate memory regions and store the information in the gSystemMemory
@@ -590,7 +590,7 @@ Returns:
MemorySizeStr = MemorySizeStr + Index1 + 1;
}
- SecPrint ("\n");
+ SecPrint ("\n\r");
//
// Hand off to SEC Core
@@ -601,7 +601,7 @@ Returns:
// If we get here, then the SEC Core returned. This is an error as SEC should
// always hand off to PEI Core and then on to DXE Core.
//
- SecPrint ("ERROR : SEC returned\n");
+ SecPrint ("ERROR : SEC returned\n\r");
exit (1);
}
--
2.21.0.windows.1
next prev parent reply other threads:[~2019-08-22 2:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-22 2:36 [Patch][edk2-stable201908 0/2] EmulatorPkg/Win/Host: Fix image unload regression Michael D Kinney
2019-08-22 2:36 ` [Patch][edk2-stable201908 1/2] " Michael D Kinney
2019-08-22 23:10 ` [edk2-devel] " Ni, Ray
2019-08-22 2:36 ` Michael D Kinney [this message]
2019-08-22 23:12 ` [edk2-devel] [Patch][edk2-stable201908 2/2] EmulatorPkg/Win/Host: Fix SecPrint() log line endings Ni, Ray
2019-08-26 19:31 ` [Patch][edk2-stable201908 0/2] EmulatorPkg/Win/Host: Fix image unload regression Tim Lewis
2019-08-26 20:35 ` [edk2-devel] " Ni, Ray
2019-08-26 21:01 ` Michael D Kinney
2019-08-26 21:10 ` Andrew Fish
2019-08-26 22:03 ` Ni, Ray
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190822023610.2068-3-michael.d.kinney@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox