From nobody Thu Dec 26 13:30:39 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1506059422128215.44553631102565; Thu, 21 Sep 2017 22:50:22 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 5088521ECCB3F; Thu, 21 Sep 2017 22:47:11 -0700 (PDT) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 66B9A21E1B757 for ; Thu, 21 Sep 2017 22:47:10 -0700 (PDT) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP; 21 Sep 2017 22:50:18 -0700 Received: from ray-dev.ccr.corp.intel.com ([10.239.9.7]) by fmsmga006.fm.intel.com with ESMTP; 21 Sep 2017 22:50:17 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,427,1500966000"; d="scan'208";a="154738582" From: Ruiyu Ni To: edk2-devel@lists.01.org Date: Fri, 22 Sep 2017 13:50:01 +0800 Message-Id: <20170922055014.27288-2-ruiyu.ni@intel.com> X-Mailer: git-send-email 2.12.2.windows.2 In-Reply-To: <20170922055014.27288-1-ruiyu.ni@intel.com> References: <20170922055014.27288-1-ruiyu.ni@intel.com> Subject: [edk2] [PATCH 01/14] ShellPkg/dh: display all the protocol names in a single line X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jaben Carsey , Huajing Li MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Huajing Li Reviewed-by: Ruiyu Ni Cc: Jaben Carsey Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Huajing Li --- 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/L= ibrary/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=3D=3DNULL?L"":ProtocolInfoString ); } else { - ProtocolInfoString =3D GetProtocolInfoString(TheHandle, Language, L"= \r\n", Verbose, TRUE); - ShellPrintHiiEx( - -1, - -1, - NULL, - STRING_TOKEN (STR_DH_OUTPUT_SINGLE), - gShellDriver1HiiHandle, - ConvertHandleToHandleIndex(TheHandle), - TheHandle, - ProtocolInfoString=3D=3DNULL?L"":ProtocolInfoString - ); + ProtocolInfoString =3D GetProtocolInfoString(TheHandle, Language, Ve= rbose ? L"\r\n" : L" ", Verbose, TRUE); + if (Verbose) { + ShellPrintHiiEx( + -1, + -1, + NULL, + STRING_TOKEN (STR_DH_OUTPUT_SINGLE), + gShellDriver1HiiHandle, + ConvertHandleToHandleIndex(TheHandle), + TheHandle, + ProtocolInfoString=3D=3DNULL?L"":ProtocolInfoString + ); + } else { + ShellPrintHiiEx( + -1, + -1, + NULL, + STRING_TOKEN (STR_DH_OUTPUT_SINGLE_D), + gShellDriver1HiiHandle, + ConvertHandleToHandleIndex(TheHandle), + ProtocolInfoString=3D=3DNULL?L"":ProtocolInfoString + ); + } } =20 if (DriverInfo) { diff --git a/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1C= ommandsLib.uni b/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriv= er1CommandsLib.uni index 05101f3782..07e8657113 100644 --- a/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1Commands= Lib.uni +++ b/ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1Commands= Lib.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" --=20 2.12.2.windows.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel