[edk2] [PATCH] ShellPkg: Add AIP IPv6 UNDI support to Shell dh

2015-12-21 Thread Samer El-Haj-Mahmoud
Update Shell DH command to decode and print the value of
gEfiAdapterInfoUndiIpv6SupportGuid AIP instance

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud 
---
 .../UefiHandleParsingLib/UefiHandleParsingLib.c | 21 +++--
 .../UefiHandleParsingLib/UefiHandleParsingLib.inf   |  4 +++-
 .../UefiHandleParsingLib/UefiHandleParsingLib.uni   |  4 +++-
 3 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c 
b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
index 6f093ff..4c46e5e 100644
--- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
+++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
@@ -1,9 +1,9 @@
 /** @file
   Provides interface to advanced shell functionality for parsing both handle 
and protocol database.
 
-  (C) Copyright 2015 Hewlett Packard Enterprise Development LP
-  (C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.
   Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.
+  (C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.
+  (C) Copyright 2015 Hewlett Packard Enterprise Development LP
   This program and the accompanying materials
   are licensed and made available under the terms and conditions of the BSD 
License
   which accompanies this distribution.  The full text of the license may be 
found at
@@ -690,6 +690,10 @@ AdapterInformationDumpInformation (
 TempRetVal = CatSPrint (RetVal, TempStr, 
L"gEfiAdapterInfoSanMacAddressGuid");
 SHELL_FREE_NON_NULL (RetVal);
 RetVal = TempRetVal;
+  } else if (CompareGuid ([GuidIndex], 
)) {
+TempRetVal = CatSPrint (RetVal, TempStr, 
L"gEfiAdapterInfoUndiIpv6SupportGuid");
+SHELL_FREE_NON_NULL (RetVal);
+RetVal = TempRetVal;
   } else {
 
 GuidStr = GetStringNameFromGuid ([GuidIndex], NULL);
@@ -782,6 +786,19 @@ AdapterInformationDumpInformation (
  );
   SHELL_FREE_NON_NULL (RetVal);
   RetVal = TempRetVal;
+} else if (CompareGuid ([GuidIndex], 
) == TRUE) {
+  TempStr = HiiGetString (mHandleParsingHiiHandle, 
STRING_TOKEN(STR_UNDI_IPV6_INFO), NULL);
+  if (TempStr == NULL) {
+goto ERROR_EXIT;
+  }
+
+  TempRetVal = CatSPrint (
+ RetVal,
+ TempStr,
+ ((EFI_ADAPTER_INFO_UNDI_IPV6_SUPPORT 
*)InformationBlock)->Ipv6Support
+ );   
+  SHELL_FREE_NON_NULL (RetVal);
+  RetVal = TempRetVal;
 } else {
   TempStr = HiiGetString (mHandleParsingHiiHandle, 
STRING_TOKEN(STR_UNKNOWN_INFO_TYPE), NULL);
   if (TempStr == NULL) {
diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf 
b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
index 4a19e39..52eed86 100644
--- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
+++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
@@ -1,7 +1,8 @@
 ##  @file
 #  Provides interface to advanced shell functionality for parsing both handle 
and protocol database.
-#  (C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.
 #  Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved. 
+#  (C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.
+#  (C) Copyright 2015 Hewlett Packard Enterprise Development LP
 #
 #  This program and the accompanying materials
 #  are licensed and made available under the terms and conditions of the BSD 
License
@@ -309,6 +310,7 @@
   gEfiAdapterInfoMediaStateGuid   ## 
SOMETIMES_CONSUMES ## GUID
   gEfiAdapterInfoNetworkBootGuid  ## 
SOMETIMES_CONSUMES ## GUID
   gEfiAdapterInfoSanMacAddressGuid## 
SOMETIMES_CONSUMES ## GUID
+  gEfiAdapterInfoUndiIpv6SupportGuid  ## 
SOMETIMES_CONSUMES ## GUID
 
 [Pcd.common]
   gEfiShellPkgTokenSpaceGuid.PcdShellPrintBufferSize  ## CONSUMES
diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni 
b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
index f7d5485..3dd8896 100644
--- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
+++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
@@ -1,7 +1,8 @@
 // /**
 //
-// (C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.
 // Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved. 
+// (C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.
+// (C) Copyright 2015 Hewlett Packard Enterprise Development LP
 // This program and the accompanying materials
 // are licensed and made available under the terms and conditions of the BSD 
License
 // which accompanies this distribution. The full text of the license may be 
found at
@@ 

Re: [edk2] [PATCH] ShellPkg: Add AIP IPv6 UNDI support to Shell dh

2015-12-21 Thread Carsey, Jaben
Reviewed-by: Jaben Carsey 

> -Original Message-
> From: Samer El-Haj-Mahmoud [mailto:samer.el-haj-mahm...@hpe.com]
> Sent: Monday, December 21, 2015 4:22 PM
> To: edk2-devel@lists.01.org
> Cc: Carsey, Jaben ; Qiu, Shumin
> ; Samer El-Haj-Mahmoud  mahm...@hpe.com>; Samer El-Haj-Mahmoud 
> Subject: [PATCH] ShellPkg: Add AIP IPv6 UNDI support to Shell dh
> Importance: High
> 
> Update Shell DH command to decode and print the value of
> gEfiAdapterInfoUndiIpv6SupportGuid AIP instance
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Samer El-Haj-Mahmoud 
> ---
>  .../UefiHandleParsingLib/UefiHandleParsingLib.c | 21
> +++--
>  .../UefiHandleParsingLib/UefiHandleParsingLib.inf   |  4 +++-
>  .../UefiHandleParsingLib/UefiHandleParsingLib.uni   |  4 +++-
>  3 files changed, 25 insertions(+), 4 deletions(-)
> 
> diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
> b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
> index 6f093ff..4c46e5e 100644
> --- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
> +++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c
> @@ -1,9 +1,9 @@
>  /** @file
>Provides interface to advanced shell functionality for parsing both handle 
> and
> protocol database.
> 
> -  (C) Copyright 2015 Hewlett Packard Enterprise Development LP
> -  (C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.
>Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.
> +  (C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.
> +  (C) Copyright 2015 Hewlett Packard Enterprise Development LP
>This program and the accompanying materials
>are licensed and made available under the terms and conditions of the BSD
> License
>which accompanies this distribution.  The full text of the license may be 
> found
> at @@ -690,6 +690,10 @@ AdapterInformationDumpInformation (
>  TempRetVal = CatSPrint (RetVal, TempStr,
> L"gEfiAdapterInfoSanMacAddressGuid");
>  SHELL_FREE_NON_NULL (RetVal);
>  RetVal = TempRetVal;
> +  } else if (CompareGuid ([GuidIndex],
> )) {
> +TempRetVal = CatSPrint (RetVal, TempStr,
> L"gEfiAdapterInfoUndiIpv6SupportGuid");
> +SHELL_FREE_NON_NULL (RetVal);
> +RetVal = TempRetVal;
>} else {
> 
>  GuidStr = GetStringNameFromGuid ([GuidIndex], NULL);
> @@ -782,6 +786,19 @@ AdapterInformationDumpInformation (
>   );
>SHELL_FREE_NON_NULL (RetVal);
>RetVal = TempRetVal;
> +} else if (CompareGuid ([GuidIndex],
> ) == TRUE) {
> +  TempStr = HiiGetString (mHandleParsingHiiHandle,
> STRING_TOKEN(STR_UNDI_IPV6_INFO), NULL);
> +  if (TempStr == NULL) {
> +goto ERROR_EXIT;
> +  }
> +
> +  TempRetVal = CatSPrint (
> + RetVal,
> + TempStr,
> + ((EFI_ADAPTER_INFO_UNDI_IPV6_SUPPORT
> *)InformationBlock)->Ipv6Support
> + );
> +  SHELL_FREE_NON_NULL (RetVal);
> +  RetVal = TempRetVal;
>  } else {
>TempStr = HiiGetString (mHandleParsingHiiHandle,
> STRING_TOKEN(STR_UNKNOWN_INFO_TYPE), NULL);
>if (TempStr == NULL) {
> diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
> b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
> index 4a19e39..52eed86 100644
> --- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
> +++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
> @@ -1,7 +1,8 @@
>  ##  @file
>  #  Provides interface to advanced shell functionality for parsing both 
> handle and
> protocol database.
> -#  (C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.
> #  Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved. 
> +#  (C) Copyright 2013-2015 Hewlett-Packard Development Company,
> +L.P. #  (C) Copyright 2015 Hewlett Packard Enterprise Development
> +LP
>  #
>  #  This program and the accompanying materials  #  are licensed and made
> available under the terms and conditions of the BSD License @@ -309,6 +310,7
> @@
>gEfiAdapterInfoMediaStateGuid   ## 
> SOMETIMES_CONSUMES ##
> GUID
>gEfiAdapterInfoNetworkBootGuid  ## 
> SOMETIMES_CONSUMES
> ## GUID
>gEfiAdapterInfoSanMacAddressGuid## 
> SOMETIMES_CONSUMES
> ## GUID
> +  gEfiAdapterInfoUndiIpv6SupportGuid  ## 
> SOMETIMES_CONSUMES
> ## GUID
> 
>  [Pcd.common]
>gEfiShellPkgTokenSpaceGuid.PcdShellPrintBufferSize  ## CONSUMES
> diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
> b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni
> index f7d5485..3dd8896 100644
>