From: "Konstantin Aladyshev" <aladyshev22@gmail.com>
To: devel@edk2.groups.io
Cc: jian.j.wang@intel.com, gaoliming@byosoft.com.cn,
dandan.bi@intel.com, shenglei.zhang@intel.com,
Konstantin Aladyshev <aladyshev22@gmail.com>
Subject: [PATCH] MdeModulePkg/DumpDynPcd: Remove unsupported format specifiers
Date: Wed, 27 Jul 2022 11:45:03 +0300 [thread overview]
Message-ID: <20220727084503.24035-1-aladyshev22@gmail.com> (raw)
Some print statements use format specifiers like %N/%H/%E/%B that are
only supported in the shell print functions. In the ordinary 'Print'
function they are just displayed as letters N/H/E/B.
Remove these unsupported format specifiers from the 'Print' statements
to fix the issue.
Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
---
.../Application/DumpDynPcd/DumpDynPcd.c | 28 +++++++++----------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/MdeModulePkg/Application/DumpDynPcd/DumpDynPcd.c b/MdeModulePkg/Application/DumpDynPcd/DumpDynPcd.c
index b8571c4556..013198963e 100644
--- a/MdeModulePkg/Application/DumpDynPcd/DumpDynPcd.c
+++ b/MdeModulePkg/Application/DumpDynPcd/DumpDynPcd.c
@@ -361,7 +361,7 @@ DumpPcdInfo (
Uint8 = mPiPcd->Get8 (TokenSpace, TokenNumber);
}
- Print (L" Token = 0x%08x - Type = %H%-17s%N - Size = 0x%x - Value = 0x%x\n", TokenNumber, RetString, PcdInfo->PcdSize, Uint8);
+ Print (L" Token = 0x%08x - Type = %-17s - Size = 0x%x - Value = 0x%x\n", TokenNumber, RetString, PcdInfo->PcdSize, Uint8);
break;
case EFI_PCD_TYPE_16:
if (TokenSpace == NULL) {
@@ -370,7 +370,7 @@ DumpPcdInfo (
Uint16 = mPiPcd->Get16 (TokenSpace, TokenNumber);
}
- Print (L" Token = 0x%08x - Type = %H%-17s%N - Size = 0x%x - Value = 0x%x\n", TokenNumber, RetString, PcdInfo->PcdSize, Uint16);
+ Print (L" Token = 0x%08x - Type = %-17s - Size = 0x%x - Value = 0x%x\n", TokenNumber, RetString, PcdInfo->PcdSize, Uint16);
break;
case EFI_PCD_TYPE_32:
if (TokenSpace == NULL) {
@@ -379,7 +379,7 @@ DumpPcdInfo (
Uint32 = mPiPcd->Get32 (TokenSpace, TokenNumber);
}
- Print (L" Token = 0x%08x - Type = %H%-17s%N - Size = 0x%x - Value = 0x%x\n", TokenNumber, RetString, PcdInfo->PcdSize, Uint32);
+ Print (L" Token = 0x%08x - Type = %-17s - Size = 0x%x - Value = 0x%x\n", TokenNumber, RetString, PcdInfo->PcdSize, Uint32);
break;
case EFI_PCD_TYPE_64:
if (TokenSpace == NULL) {
@@ -388,7 +388,7 @@ DumpPcdInfo (
Uint64 = mPiPcd->Get64 (TokenSpace, TokenNumber);
}
- Print (L" Token = 0x%08x - Type = %H%-17s%N - Size = 0x%x - Value = 0x%lx\n", TokenNumber, RetString, PcdInfo->PcdSize, Uint64);
+ Print (L" Token = 0x%08x - Type = %-17s - Size = 0x%x - Value = 0x%lx\n", TokenNumber, RetString, PcdInfo->PcdSize, Uint64);
break;
case EFI_PCD_TYPE_BOOL:
if (TokenSpace == NULL) {
@@ -397,7 +397,7 @@ DumpPcdInfo (
Boolean = mPiPcd->GetBool (TokenSpace, TokenNumber);
}
- Print (L" Token = 0x%08x - Type = %H%-17s%N - Size = 0x%x - Value = %a\n", TokenNumber, RetString, PcdInfo->PcdSize, Boolean ? "TRUE" : "FALSE");
+ Print (L" Token = 0x%08x - Type = %-17s - Size = 0x%x - Value = %a\n", TokenNumber, RetString, PcdInfo->PcdSize, Boolean ? "TRUE" : "FALSE");
break;
case EFI_PCD_TYPE_PTR:
if (TokenSpace == NULL) {
@@ -406,7 +406,7 @@ DumpPcdInfo (
PcdData = mPiPcd->GetPtr (TokenSpace, TokenNumber);
}
- Print (L" Token = 0x%08x - Type = %H%-17s%N - Size = 0x%x\n", TokenNumber, RetString, PcdInfo->PcdSize);
+ Print (L" Token = 0x%08x - Type = %-17s - Size = 0x%x\n", TokenNumber, RetString, PcdInfo->PcdSize);
DumpHex (2, 0, PcdInfo->PcdSize, PcdData);
break;
default:
@@ -509,7 +509,7 @@ ProcessPcd (
//
// The specified PCD is not found, print error.
//
- Print (L"%EError. %NNo matching PCD found: %s.\n", InputPcdName);
+ Print (L"Error. No matching PCD found: %s.\n", InputPcdName);
return EFI_NOT_FOUND;
}
@@ -548,25 +548,25 @@ DumpDynPcdMain (
Status = gBS->LocateProtocol (&gEfiPcdProtocolGuid, NULL, (VOID **)&mPiPcd);
if (EFI_ERROR (Status)) {
- Print (L"DumpDynPcd: %EError. %NPI PCD protocol is not present.\n");
+ Print (L"DumpDynPcd: Error. PI PCD protocol is not present.\n");
return Status;
}
Status = gBS->LocateProtocol (&gEfiGetPcdInfoProtocolGuid, NULL, (VOID **)&mPiPcdInfo);
if (EFI_ERROR (Status)) {
- Print (L"DumpDynPcd: %EError. %NPI PCD info protocol is not present.\n");
+ Print (L"DumpDynPcd: Error. PI PCD info protocol is not present.\n");
return Status;
}
Status = gBS->LocateProtocol (&gPcdProtocolGuid, NULL, (VOID **)&mPcd);
if (EFI_ERROR (Status)) {
- Print (L"DumpDynPcd: %EError. %NPCD protocol is not present.\n");
+ Print (L"DumpDynPcd: Error. PCD protocol is not present.\n");
return Status;
}
Status = gBS->LocateProtocol (&gGetPcdInfoProtocolGuid, NULL, (VOID **)&mPcdInfo);
if (EFI_ERROR (Status)) {
- Print (L"DumpDynPcd: %EError. %NPCD info protocol is not present.\n");
+ Print (L"DumpDynPcd: Error. PCD info protocol is not present.\n");
return Status;
}
@@ -575,13 +575,13 @@ DumpDynPcdMain (
//
Status = GetArg ();
if (EFI_ERROR (Status)) {
- Print (L"DumpDynPcd: %EError. %NThe input parameters are not recognized.\n");
+ Print (L"DumpDynPcd: Error. The input parameters are not recognized.\n");
Status = EFI_INVALID_PARAMETER;
return Status;
}
if (Argc > 2) {
- Print (L"DumpDynPcd: %EError. %NToo many arguments specified.\n");
+ Print (L"DumpDynPcd: Error. Too many arguments specified.\n");
Status = EFI_INVALID_PARAMETER;
return Status;
}
@@ -600,7 +600,7 @@ DumpDynPcdMain (
goto Done;
} else {
if (StrStr (Argv[1], L"-") != NULL) {
- Print (L"DumpDynPcd: %EError. %NThe argument '%B%s%N' is invalid.\n", Argv[1]);
+ Print (L"DumpDynPcd: Error. The argument '%s' is invalid.\n", Argv[1]);
goto Done;
}
}
--
2.25.1
next reply other threads:[~2022-07-27 8:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-27 8:45 Konstantin Aladyshev [this message]
2022-08-05 3:20 ` 回复: [edk2-devel] [PATCH] MdeModulePkg/DumpDynPcd: Remove unsupported format specifiers gaoliming
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=20220727084503.24035-1-aladyshev22@gmail.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