2 Utility routines used by boot maintenance modules.
4 Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #include "BootMaintenanceManager.h"
18 Function deletes the variable specified by VarName and VarGuid.
20 @param VarName A Null-terminated Unicode string that is
21 the name of the vendor's variable.
23 @param VarGuid A unique identifier for the vendor.
25 @retval EFI_SUCCESS The variable was found and removed
26 @retval EFI_UNSUPPORTED The variable store was inaccessible
27 @retval EFI_NOT_FOUND The variable was not found
31 EfiLibDeleteVariable (
36 return gRT
->SetVariable (
46 Function is used to determine the number of device path instances
47 that exist in a device path.
50 @param DevicePath A pointer to a device path data structure.
52 @return This function counts and returns the number of device path instances
57 EfiDevicePathInstanceCount (
58 IN EFI_DEVICE_PATH_PROTOCOL
*DevicePath
65 while (GetNextDevicePathInstance (&DevicePath
, &Size
) != NULL
) {
73 Get a string from the Data Hub record based on
76 @param DevPath The device Path.
78 @return A string located from the Data Hub records based on
80 @retval NULL If failed to get the String from Data Hub.
84 EfiLibStrFromDatahub (
85 IN EFI_DEVICE_PATH_PROTOCOL
*DevPath