public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] ShellPkg/comp: Fix file tag name.
@ 2017-04-20  2:50 Ruiyu Ni
  2017-04-20  2:50 ` [PATCH] ShellPkg/pci: Fix VS2012 build failure Ruiyu Ni
  2017-04-20 20:20 ` [PATCH] ShellPkg/comp: Fix file tag name Carsey, Jaben
  0 siblings, 2 replies; 4+ messages in thread
From: Ruiyu Ni @ 2017-04-20  2:50 UTC (permalink / raw)
  To: edk2-devel; +Cc: Chen A Chen

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen A Chen <chen.a.chen@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
---
 ShellPkg/Library/UefiShellDebug1CommandsLib/Comp.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Comp.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/Comp.c
index 05edcb7c99..f45f663dbb 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Comp.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Comp.c
@@ -30,7 +30,8 @@ typedef enum {
 /**
   Function to print differnt point data.
 
-  @param[in]  FileName        File name
+  @param[in]  FileName        File name.
+  @param[in]  FileTag         File tag name.
   @param[in]  Buffer          Data buffer to be printed.
   @param[in]  BufferSize      Size of the data to be printed.
   @param[in]  Address         Address of the differnt point.
@@ -40,6 +41,7 @@ typedef enum {
 VOID
 PrintDifferentPoint(
   CONST CHAR16  *FileName,
+  CHAR16        *FileTag,
   UINT8         *Buffer,
   UINT64        BufferSize,
   UINTN         Address,
@@ -48,7 +50,7 @@ PrintDifferentPoint(
 {
   UINTN Index;
 
-  ShellPrintEx (-1, -1, L"%s: %s\r\n  %08x:", L"File1", FileName, Address);
+  ShellPrintEx (-1, -1, L"%s: %s\r\n  %08x:", FileTag, FileName, Address);
 
   //
   // Print data in hex-format.
@@ -302,8 +304,8 @@ ShellCommandRunComp (
              ) {
 
             ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_COMP_DIFFERENCE_POINT), gShellDebug1HiiHandle, ++DiffPointNumber);
-            PrintDifferentPoint (FileName1, DataFromFile1, InsertPosition1, DiffPointAddress, DifferentBytes);
-            PrintDifferentPoint (FileName2, DataFromFile2, InsertPosition2, DiffPointAddress, DifferentBytes);
+            PrintDifferentPoint (FileName1, L"File1", DataFromFile1, InsertPosition1, DiffPointAddress, DifferentBytes);
+            PrintDifferentPoint (FileName2, L"File2", DataFromFile2, InsertPosition2, DiffPointAddress, DifferentBytes);
 
             //
             // One of two buffuers is empty, it means this is the last different point.
-- 
2.12.2.windows.2



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] ShellPkg/pci: Fix VS2012 build failure
  2017-04-20  2:50 [PATCH] ShellPkg/comp: Fix file tag name Ruiyu Ni
@ 2017-04-20  2:50 ` Ruiyu Ni
  2017-04-20  2:57   ` Wu, Hao A
  2017-04-20 20:20 ` [PATCH] ShellPkg/comp: Fix file tag name Carsey, Jaben
  1 sibling, 1 reply; 4+ messages in thread
From: Ruiyu Ni @ 2017-04-20  2:50 UTC (permalink / raw)
  To: edk2-devel; +Cc: Hao A Wu, Dandan Bi

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
---
 ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c
index 99335f05c5..38559571c2 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c
@@ -2885,6 +2885,7 @@ ShellCommandRunPci (
      );
 
     ExtendedConfigSpace = NULL;
+    ExtendedConfigSize  = 0;
     PcieCapabilityPtr = LocatePciCapability (&ConfigSpace, EFI_PCI_CAPABILITY_ID_PCIEXP);
     if (PcieCapabilityPtr != 0) {
       ExtendedConfigSize  = 0x1000 - EFI_PCIE_CAPABILITY_BASE_OFFSET;
@@ -2922,7 +2923,7 @@ ShellCommandRunPci (
     //
     if (ExplainData) {
       PciExplainPci (&ConfigSpace, Address, IoDev);
-      if ((PcieCapabilityPtr != 0) && !ShellGetExecutionBreakFlag ()) {
+      if ((ExtendedConfigSpace != NULL) && !ShellGetExecutionBreakFlag ()) {
         PciExplainPciExpress (
           (PCI_CAPABILITY_PCIEXP *) ((UINT8 *) &ConfigSpace + PcieCapabilityPtr),
           ExtendedConfigSpace,
-- 
2.12.2.windows.2



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ShellPkg/pci: Fix VS2012 build failure
  2017-04-20  2:50 ` [PATCH] ShellPkg/pci: Fix VS2012 build failure Ruiyu Ni
@ 2017-04-20  2:57   ` Wu, Hao A
  0 siblings, 0 replies; 4+ messages in thread
From: Wu, Hao A @ 2017-04-20  2:57 UTC (permalink / raw)
  To: Ni, Ruiyu, edk2-devel@lists.01.org; +Cc: Bi, Dandan

Reviewed-by: Hao Wu <hao.a.wu@intel.com>


Best Regards,
Hao Wu


> -----Original Message-----
> From: Ni, Ruiyu
> Sent: Thursday, April 20, 2017 10:51 AM
> To: edk2-devel@lists.01.org
> Cc: Wu, Hao A; Bi, Dandan
> Subject: [PATCH] ShellPkg/pci: Fix VS2012 build failure
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
> Cc: Hao A Wu <hao.a.wu@intel.com>
> Cc: Dandan Bi <dandan.bi@intel.com>
> ---
>  ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c
> index 99335f05c5..38559571c2 100644
> --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c
> +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c
> @@ -2885,6 +2885,7 @@ ShellCommandRunPci (
>       );
> 
>      ExtendedConfigSpace = NULL;
> +    ExtendedConfigSize  = 0;
>      PcieCapabilityPtr = LocatePciCapability (&ConfigSpace,
> EFI_PCI_CAPABILITY_ID_PCIEXP);
>      if (PcieCapabilityPtr != 0) {
>        ExtendedConfigSize  = 0x1000 - EFI_PCIE_CAPABILITY_BASE_OFFSET;
> @@ -2922,7 +2923,7 @@ ShellCommandRunPci (
>      //
>      if (ExplainData) {
>        PciExplainPci (&ConfigSpace, Address, IoDev);
> -      if ((PcieCapabilityPtr != 0) && !ShellGetExecutionBreakFlag ()) {
> +      if ((ExtendedConfigSpace != NULL) && !ShellGetExecutionBreakFlag ()) {
>          PciExplainPciExpress (
>            (PCI_CAPABILITY_PCIEXP *) ((UINT8 *) &ConfigSpace +
> PcieCapabilityPtr),
>            ExtendedConfigSpace,
> --
> 2.12.2.windows.2



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ShellPkg/comp: Fix file tag name.
  2017-04-20  2:50 [PATCH] ShellPkg/comp: Fix file tag name Ruiyu Ni
  2017-04-20  2:50 ` [PATCH] ShellPkg/pci: Fix VS2012 build failure Ruiyu Ni
@ 2017-04-20 20:20 ` Carsey, Jaben
  1 sibling, 0 replies; 4+ messages in thread
From: Carsey, Jaben @ 2017-04-20 20:20 UTC (permalink / raw)
  To: Ni, Ruiyu, edk2-devel@lists.01.org; +Cc: Chen, Chen A

Do we need to localize that in HII? I am unsure, but I  don't have strong opinion.

Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> Ruiyu Ni
> Sent: Wednesday, April 19, 2017 7:51 PM
> To: edk2-devel@lists.01.org
> Cc: Chen, Chen A <chen.a.chen@intel.com>
> Subject: [edk2] [PATCH] ShellPkg/comp: Fix file tag name.
> Importance: High
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Chen A Chen <chen.a.chen@intel.com>
> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
> ---
>  ShellPkg/Library/UefiShellDebug1CommandsLib/Comp.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Comp.c
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/Comp.c
> index 05edcb7c99..f45f663dbb 100644
> --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Comp.c
> +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Comp.c
> @@ -30,7 +30,8 @@ typedef enum {
>  /**
>    Function to print differnt point data.
> 
> -  @param[in]  FileName        File name
> +  @param[in]  FileName        File name.
> +  @param[in]  FileTag         File tag name.
>    @param[in]  Buffer          Data buffer to be printed.
>    @param[in]  BufferSize      Size of the data to be printed.
>    @param[in]  Address         Address of the differnt point.
> @@ -40,6 +41,7 @@ typedef enum {
>  VOID
>  PrintDifferentPoint(
>    CONST CHAR16  *FileName,
> +  CHAR16        *FileTag,
>    UINT8         *Buffer,
>    UINT64        BufferSize,
>    UINTN         Address,
> @@ -48,7 +50,7 @@ PrintDifferentPoint(
>  {
>    UINTN Index;
> 
> -  ShellPrintEx (-1, -1, L"%s: %s\r\n  %08x:", L"File1", FileName, Address);
> +  ShellPrintEx (-1, -1, L"%s: %s\r\n  %08x:", FileTag, FileName, Address);
> 
>    //
>    // Print data in hex-format.
> @@ -302,8 +304,8 @@ ShellCommandRunComp (
>               ) {
> 
>              ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN
> (STR_COMP_DIFFERENCE_POINT), gShellDebug1HiiHandle,
> ++DiffPointNumber);
> -            PrintDifferentPoint (FileName1, DataFromFile1, InsertPosition1,
> DiffPointAddress, DifferentBytes);
> -            PrintDifferentPoint (FileName2, DataFromFile2, InsertPosition2,
> DiffPointAddress, DifferentBytes);
> +            PrintDifferentPoint (FileName1, L"File1", DataFromFile1,
> InsertPosition1, DiffPointAddress, DifferentBytes);
> +            PrintDifferentPoint (FileName2, L"File2", DataFromFile2,
> InsertPosition2, DiffPointAddress, DifferentBytes);
> 
>              //
>              // One of two buffuers is empty, it means this is the last different
> point.
> --
> 2.12.2.windows.2
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-04-20 20:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-20  2:50 [PATCH] ShellPkg/comp: Fix file tag name Ruiyu Ni
2017-04-20  2:50 ` [PATCH] ShellPkg/pci: Fix VS2012 build failure Ruiyu Ni
2017-04-20  2:57   ` Wu, Hao A
2017-04-20 20:20 ` [PATCH] ShellPkg/comp: Fix file tag name Carsey, Jaben

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox