From: Ruiyu Ni <ruiyu.ni@intel.com>
To: edk2-devel@lists.01.org
Cc: Huajing Li <huajing.li@intel.com>, Jaben Carsey <jaben.carsey@intel.com>
Subject: [PATCH 01/14] ShellPkg/dh: display all the protocol names in a single line
Date: Fri, 22 Sep 2017 13:50:01 +0800 [thread overview]
Message-ID: <20170922055014.27288-2-ruiyu.ni@intel.com> (raw)
In-Reply-To: <20170922055014.27288-1-ruiyu.ni@intel.com>
From: Huajing Li <huajing.li@intel.com>
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>
---
ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c | 36 ++++++++++++++--------
.../UefiShellDriver1CommandsLib.uni | 1 +
2 files changed, 25 insertions(+), 12 deletions(-)
diff --git a/ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c b/ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c
index 170a868e07..3694e501b6 100644
--- a/ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c
+++ b/ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c
@@ -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) {
diff --git a/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.uni b/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.uni
index 05101f3782..07e8657113 100644
--- a/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.uni
+++ b/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.uni
@@ -106,6 +106,7 @@
#string STR_DH_OUTPUT_ALL_HEADER #language en-US "Handle dump\r\n"
#string STR_DH_OUTPUT_GUID_HEADER #language en-US "Handle dump by protocol '%g'\r\n"
#string STR_DH_OUTPUT_NAME_HEADER #language en-US "Handle dump by protocol '%s'\r\n"
+#string STR_DH_OUTPUT_SINGLE_D #language en-US "%H%02x%N: %s\r\n"
#string STR_DH_OUTPUT_SINGLE #language en-US "%H%02x%N: %x\r\n%s"
#string STR_DH_OUTPUT_SFO #language en-US "%s, %s, %s, %H%02x%N, %s, %s\r\n"
#string STR_DH_OUTPUT_DRIVER1 #language en-US " Controller Name : %B%s%N\r\n"
--
2.12.2.windows.2
next prev parent reply other threads:[~2017-09-22 5:47 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-22 5:50 [PATCH 00/14] Refine output of "dh" Ruiyu Ni
2017-09-22 5:50 ` Ruiyu Ni [this message]
2017-09-22 5:50 ` [PATCH 02/14] ShellPkg/dh: change the key information color from blue to hilight Ruiyu Ni
2017-09-22 5:50 ` [PATCH 03/14] ShellPkg/dh: fix the error display "Child Controllers" to "Managing" Ruiyu Ni
2017-09-22 5:50 ` [PATCH 04/14] ShellPkg/dh: Display the protocol instance pointer value for "-v" Ruiyu Ni
2017-09-22 5:50 ` [PATCH 05/14] ShellPkg/dh: Modify the dump of "ImageDevicePath" and "DevicePath" Ruiyu Ni
2017-09-22 5:50 ` [PATCH 06/14] ShellPkg/dh: Modify the dump of LoadedImage protocol Ruiyu Ni
2017-09-22 5:50 ` [PATCH 07/14] ShellPkg/dh: Modify the dump of BusSpecificDriverOverride protocol Ruiyu Ni
2017-09-22 5:50 ` [PATCH 08/14] ShellPkg/dh: Modify the dump of BlockIo protocol Ruiyu Ni
2017-09-22 5:50 ` [PATCH 09/14] ShellPkg/dh: Modify the dump of DebugSupport protocol Ruiyu Ni
2017-09-22 5:50 ` [PATCH 10/14] ShellPkg/dh: Modify the dump of GraphicsOutput protocol Ruiyu Ni
2017-09-22 5:50 ` [PATCH 11/14] ShellPkg/dh: Modify the dump of PciIo protocol Ruiyu Ni
2017-09-22 5:50 ` [PATCH 12/14] ShellPkg/dh: Modify the dump of UsbIo protocol Ruiyu Ni
2017-09-22 5:50 ` [PATCH 13/14] " Ruiyu Ni
2017-09-22 5:50 ` [PATCH 14/14] ShellPkg/dh: Refine the dump output Ruiyu Ni
2017-09-22 11:57 ` [PATCH 00/14] Refine output of "dh" Laszlo Ersek
2017-09-22 14:04 ` Carsey, Jaben
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=20170922055014.27288-2-ruiyu.ni@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