/** @file\r
The implementation for Ping6 application.\r
\r
- Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
#include <Library/MemoryAllocationLib.h>\r
#include <Library/DebugLib.h>\r
#include <Library/UefiBootServicesTableLib.h>\r
+#include <Library/UefiHiiServicesLib.h>\r
#include <Library/HiiLib.h>\r
#include <Library/NetLib.h>\r
\r
L"-s",\r
TypeValue\r
},\r
- {\r
- L"-?",\r
- TypeFlag\r
- },\r
{\r
NULL,\r
TypeMax\r
CONST CHAR16 *ValueStr;\r
CONST CHAR16 *ValueStrPtr;\r
UINTN NonOptionCount;\r
+ EFI_HII_PACKAGE_LIST_HEADER *PackageList;\r
\r
//\r
- // Register our string package with HII and return the handle to it.\r
+ // Retrieve HII package list from ImageHandle\r
//\r
- mHiiHandle = HiiAddPackages (&gEfiCallerIdGuid, ImageHandle, Ping6Strings, NULL);\r
+ Status = gBS->OpenProtocol (\r
+ ImageHandle,\r
+ &gEfiHiiPackageListProtocolGuid,\r
+ (VOID **) &PackageList,\r
+ ImageHandle,\r
+ NULL,\r
+ EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
+ );\r
+ if (EFI_ERROR (Status)) {\r
+ return Status;\r
+ }\r
+\r
+ //\r
+ // Publish HII package list to HII Database.\r
+ //\r
+ Status = gHiiDatabase->NewPackageList (\r
+ gHiiDatabase,\r
+ PackageList,\r
+ NULL,\r
+ &mHiiHandle\r
+ );\r
+ if (EFI_ERROR (Status)) {\r
+ return Status;\r
+ }\r
+ \r
ASSERT (mHiiHandle != NULL);\r
\r
Status = ShellCommandLineParseEx (Ping6ParamList, &ParamPackage, NULL, TRUE, FALSE);\r
goto ON_EXIT;\r
}\r
\r
- if (ShellCommandLineGetFlag (ParamPackage, L"-?")) {\r
- ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_PING6_HELP), mHiiHandle);\r
- goto ON_EXIT;\r
- }\r
-\r
SendNumber = 10;\r
BufferSize = 16;\r
\r