/** @file\r
- This library retrieves pointers to the UEFI HII Protocol instances in the \r
- library's constructor. All of the UEFI HII related protocols are optional, \r
- so the consumers of this library class must verify that the global variable \r
- pointers are not NULL before use. \r
+ This library retrieves pointers to the UEFI HII Protocol instances in the\r
+ library's constructor. All of the UEFI HII related protocols are optional,\r
+ so the consumers of this library class must verify that the global variable\r
+ pointers are not NULL before use.\r
\r
- Copyright (c) 2006 - 2009, Intel Corporation<BR>\r
- All rights reserved. This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+ SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
\r
\r
/**\r
The constructor function retrieves pointers to the UEFI HII protocol instances\r
- \r
- The constructor function retrieves pointers to the four UEFI HII protocols from the \r
- handle database. These include the UEFI HII Font Protocol, the UEFI HII String \r
- Protocol, the UEFI HII Image Protocol, the UEFI HII Database Protocol, and the \r
+\r
+ The constructor function retrieves pointers to the four UEFI HII protocols from the\r
+ handle database. These include the UEFI HII Font Protocol, the UEFI HII String\r
+ Protocol, the UEFI HII Image Protocol, the UEFI HII Database Protocol, and the\r
UEFI HII Config Routing Protocol. This function always return EFI_SUCCESS.\r
All of these protocols are optional if the platform does not support configuration\r
- and the UEFI HII Image Protocol and the UEFI HII Font Protocol are optional if \r
+ and the UEFI HII Image Protocol and the UEFI HII Font Protocol are optional if\r
the platform does not support a graphical console. As a result, the consumers\r
of this library much check the protocol pointers againt NULL before using them,\r
or use dependency expressions to guarantee that some of them are present before\r
IN EFI_SYSTEM_TABLE *SystemTable\r
)\r
{\r
+ EFI_STATUS Status;\r
+\r
//\r
- // Retrieve the pointer to the UEFI HII Font Protocol \r
+ // Retrieve the pointer to the UEFI HII String Protocol\r
//\r
- gBS->LocateProtocol (&gEfiHiiFontProtocolGuid, NULL, (VOID **) &gHiiFont);\r
+ Status = gBS->LocateProtocol (&gEfiHiiStringProtocolGuid, NULL, (VOID **) &gHiiString);\r
+ ASSERT_EFI_ERROR (Status);\r
\r
//\r
- // Retrieve the pointer to the UEFI HII String Protocol \r
+ // Retrieve the pointer to the UEFI HII Database Protocol\r
//\r
- gBS->LocateProtocol (&gEfiHiiStringProtocolGuid, NULL, (VOID **) &gHiiString);\r
+ Status = gBS->LocateProtocol (&gEfiHiiDatabaseProtocolGuid, NULL, (VOID **) &gHiiDatabase);\r
+ ASSERT_EFI_ERROR (Status);\r
\r
//\r
- // Retrieve the pointer to the UEFI HII Image Protocol \r
+ // Retrieve the pointer to the UEFI HII Config Routing Protocol\r
//\r
- gBS->LocateProtocol (&gEfiHiiImageProtocolGuid, NULL, (VOID **) &gHiiImage);\r
+ Status = gBS->LocateProtocol (&gEfiHiiConfigRoutingProtocolGuid, NULL, (VOID **) &gHiiConfigRouting);\r
+ ASSERT_EFI_ERROR (Status);\r
\r
//\r
- // Retrieve the pointer to the UEFI HII Database Protocol \r
+ // Retrieve the pointer to the optional UEFI HII Font Protocol\r
//\r
- gBS->LocateProtocol (&gEfiHiiDatabaseProtocolGuid, NULL, (VOID **) &gHiiDatabase);\r
+ gBS->LocateProtocol (&gEfiHiiFontProtocolGuid, NULL, (VOID **) &gHiiFont);\r
\r
//\r
- // Retrieve the pointer to the UEFI HII Config Routing Protocol \r
+ // Retrieve the pointer to the optional UEFI HII Image Protocol\r
//\r
- gBS->LocateProtocol (&gEfiHiiConfigRoutingProtocolGuid, NULL, (VOID **) &gHiiConfigRouting);\r
+ gBS->LocateProtocol (&gEfiHiiImageProtocolGuid, NULL, (VOID **) &gHiiImage);\r
\r
return EFI_SUCCESS;\r
}\r