[PATCH] MdeModulePkg/DumpDynPcd: Remove unsupported format specifiers


Konstantin Aladyshev
 

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@...>
---
.../Application/DumpDynPcd/DumpDynPcd.c | 28 +++++++++----------
1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/MdeModulePkg/Application/DumpDynPcd/DumpDynPcd.c b/MdeModulePk=
g/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 =3D mPiPcd->Get8 (TokenSpace, TokenNumber);=0D
}=0D
=0D
- Print (L" Token =3D 0x%08x - Type =3D %H%-17s%N - Size =3D 0x%x - V=
alue =3D 0x%x\n", TokenNumber, RetString, PcdInfo->PcdSize, Uint8);=0D
+ Print (L" Token =3D 0x%08x - Type =3D %-17s - Size =3D 0x%x - Value=
=3D 0x%x\n", TokenNumber, RetString, PcdInfo->PcdSize, Uint8);=0D
break;=0D
case EFI_PCD_TYPE_16:=0D
if (TokenSpace =3D=3D NULL) {=0D
@@ -370,7 +370,7 @@ DumpPcdInfo (
Uint16 =3D mPiPcd->Get16 (TokenSpace, TokenNumber);=0D
}=0D
=0D
- Print (L" Token =3D 0x%08x - Type =3D %H%-17s%N - Size =3D 0x%x - V=
alue =3D 0x%x\n", TokenNumber, RetString, PcdInfo->PcdSize, Uint16);=0D
+ Print (L" Token =3D 0x%08x - Type =3D %-17s - Size =3D 0x%x - Value=
=3D 0x%x\n", TokenNumber, RetString, PcdInfo->PcdSize, Uint16);=0D
break;=0D
case EFI_PCD_TYPE_32:=0D
if (TokenSpace =3D=3D NULL) {=0D
@@ -379,7 +379,7 @@ DumpPcdInfo (
Uint32 =3D mPiPcd->Get32 (TokenSpace, TokenNumber);=0D
}=0D
=0D
- Print (L" Token =3D 0x%08x - Type =3D %H%-17s%N - Size =3D 0x%x - V=
alue =3D 0x%x\n", TokenNumber, RetString, PcdInfo->PcdSize, Uint32);=0D
+ Print (L" Token =3D 0x%08x - Type =3D %-17s - Size =3D 0x%x - Value=
=3D 0x%x\n", TokenNumber, RetString, PcdInfo->PcdSize, Uint32);=0D
break;=0D
case EFI_PCD_TYPE_64:=0D
if (TokenSpace =3D=3D NULL) {=0D
@@ -388,7 +388,7 @@ DumpPcdInfo (
Uint64 =3D mPiPcd->Get64 (TokenSpace, TokenNumber);=0D
}=0D
=0D
- Print (L" Token =3D 0x%08x - Type =3D %H%-17s%N - Size =3D 0x%x - V=
alue =3D 0x%lx\n", TokenNumber, RetString, PcdInfo->PcdSize, Uint64);=0D
+ Print (L" Token =3D 0x%08x - Type =3D %-17s - Size =3D 0x%x - Value=
=3D 0x%lx\n", TokenNumber, RetString, PcdInfo->PcdSize, Uint64);=0D
break;=0D
case EFI_PCD_TYPE_BOOL:=0D
if (TokenSpace =3D=3D NULL) {=0D
@@ -397,7 +397,7 @@ DumpPcdInfo (
Boolean =3D mPiPcd->GetBool (TokenSpace, TokenNumber);=0D
}=0D
=0D
- Print (L" Token =3D 0x%08x - Type =3D %H%-17s%N - Size =3D 0x%x - V=
alue =3D %a\n", TokenNumber, RetString, PcdInfo->PcdSize, Boolean ? "TRUE" =
: "FALSE");=0D
+ Print (L" Token =3D 0x%08x - Type =3D %-17s - Size =3D 0x%x - Value=
=3D %a\n", TokenNumber, RetString, PcdInfo->PcdSize, Boolean ? "TRUE" : "F=
ALSE");=0D
break;=0D
case EFI_PCD_TYPE_PTR:=0D
if (TokenSpace =3D=3D NULL) {=0D
@@ -406,7 +406,7 @@ DumpPcdInfo (
PcdData =3D mPiPcd->GetPtr (TokenSpace, TokenNumber);=0D
}=0D
=0D
- Print (L" Token =3D 0x%08x - Type =3D %H%-17s%N - Size =3D 0x%x\n",=
TokenNumber, RetString, PcdInfo->PcdSize);=0D
+ Print (L" Token =3D 0x%08x - Type =3D %-17s - Size =3D 0x%x\n", Tok=
enNumber, RetString, PcdInfo->PcdSize);=0D
DumpHex (2, 0, PcdInfo->PcdSize, PcdData);=0D
break;=0D
default:=0D
@@ -509,7 +509,7 @@ ProcessPcd (
//=0D
// The specified PCD is not found, print error.=0D
//=0D
- Print (L"%EError. %NNo matching PCD found: %s.\n", InputPcdName);=0D
+ Print (L"Error. No matching PCD found: %s.\n", InputPcdName);=0D
return EFI_NOT_FOUND;=0D
}=0D
=0D
@@ -548,25 +548,25 @@ DumpDynPcdMain (
=0D
Status =3D gBS->LocateProtocol (&gEfiPcdProtocolGuid, NULL, (VOID **)&mP=
iPcd);=0D
if (EFI_ERROR (Status)) {=0D
- Print (L"DumpDynPcd: %EError. %NPI PCD protocol is not present.\n");=0D
+ Print (L"DumpDynPcd: Error. PI PCD protocol is not present.\n");=0D
return Status;=0D
}=0D
=0D
Status =3D gBS->LocateProtocol (&gEfiGetPcdInfoProtocolGuid, NULL, (VOID=
**)&mPiPcdInfo);=0D
if (EFI_ERROR (Status)) {=0D
- Print (L"DumpDynPcd: %EError. %NPI PCD info protocol is not present.\n=
");=0D
+ Print (L"DumpDynPcd: Error. PI PCD info protocol is not present.\n");=
=0D
return Status;=0D
}=0D
=0D
Status =3D gBS->LocateProtocol (&gPcdProtocolGuid, NULL, (VOID **)&mPcd)=
;=0D
if (EFI_ERROR (Status)) {=0D
- Print (L"DumpDynPcd: %EError. %NPCD protocol is not present.\n");=0D
+ Print (L"DumpDynPcd: Error. PCD protocol is not present.\n");=0D
return Status;=0D
}=0D
=0D
Status =3D gBS->LocateProtocol (&gGetPcdInfoProtocolGuid, NULL, (VOID **=
)&mPcdInfo);=0D
if (EFI_ERROR (Status)) {=0D
- Print (L"DumpDynPcd: %EError. %NPCD info protocol is not present.\n");=
=0D
+ Print (L"DumpDynPcd: Error. PCD info protocol is not present.\n");=0D
return Status;=0D
}=0D
=0D
@@ -575,13 +575,13 @@ DumpDynPcdMain (
//=0D
Status =3D GetArg ();=0D
if (EFI_ERROR (Status)) {=0D
- Print (L"DumpDynPcd: %EError. %NThe input parameters are not recognize=
d.\n");=0D
+ Print (L"DumpDynPcd: Error. The input parameters are not recognized.\n=
");=0D
Status =3D EFI_INVALID_PARAMETER;=0D
return Status;=0D
}=0D
=0D
if (Argc > 2) {=0D
- Print (L"DumpDynPcd: %EError. %NToo many arguments specified.\n");=0D
+ Print (L"DumpDynPcd: Error. Too many arguments specified.\n");=0D
Status =3D EFI_INVALID_PARAMETER;=0D
return Status;=0D
}=0D
@@ -600,7 +600,7 @@ DumpDynPcdMain (
goto Done;=0D
} else {=0D
if (StrStr (Argv[1], L"-") !=3D NULL) {=0D
- Print (L"DumpDynPcd: %EError. %NThe argument '%B%s%N' is invalid.\=
n", Argv[1]);=0D
+ Print (L"DumpDynPcd: Error. The argument '%s' is invalid.\n", Argv=
[1]);=0D
goto Done;=0D
}=0D
}=0D
--=20
2.25.1

Join devel@edk2.groups.io to automatically receive all group messages.