ShellPkg/dh: display all the protocol names in a single line

Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Huajing Li <huajing.li@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
This commit is contained in:
Huajing Li
2017-09-21 11:14:17 +08:00
committed by Ruiyu Ni
parent 5b7c224505
commit 590351cf1e
2 changed files with 25 additions and 12 deletions

View File

@ -319,7 +319,7 @@ GetProtocolInfoString(
if (!Verbose) {
StrnCatGrow(&RetVal, &Size, L"(", 0);
StrnCatGrow(&RetVal, &Size, Temp, 0);
StrnCatGrow(&RetVal, &Size, L")\r\n", 0);
StrnCatGrow(&RetVal, &Size, L")", 0);
} else {
StrnCatGrow(&RetVal, &Size, Separator, 0);
StrnCatGrow(&RetVal, &Size, Temp, 0);
@ -802,17 +802,29 @@ DoDhByHandle(
ProtocolInfoString==NULL?L"":ProtocolInfoString
);
} else {
ProtocolInfoString = GetProtocolInfoString(TheHandle, Language, L"\r\n", Verbose, TRUE);
ShellPrintHiiEx(
-1,
-1,
NULL,
STRING_TOKEN (STR_DH_OUTPUT_SINGLE),
gShellDriver1HiiHandle,
ConvertHandleToHandleIndex(TheHandle),
TheHandle,
ProtocolInfoString==NULL?L"":ProtocolInfoString
);
ProtocolInfoString = GetProtocolInfoString(TheHandle, Language, Verbose ? L"\r\n" : L" ", Verbose, TRUE);
if (Verbose) {
ShellPrintHiiEx(
-1,
-1,
NULL,
STRING_TOKEN (STR_DH_OUTPUT_SINGLE),
gShellDriver1HiiHandle,
ConvertHandleToHandleIndex(TheHandle),
TheHandle,
ProtocolInfoString==NULL?L"":ProtocolInfoString
);
} else {
ShellPrintHiiEx(
-1,
-1,
NULL,
STRING_TOKEN (STR_DH_OUTPUT_SINGLE_D),
gShellDriver1HiiHandle,
ConvertHandleToHandleIndex(TheHandle),
ProtocolInfoString==NULL?L"":ProtocolInfoString
);
}
}
if (DriverInfo) {