2 Utility routines used by boot maintenance modules.
4 Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
9 #include "BootMaintenanceManager.h"
12 Function deletes the variable specified by VarName and VarGuid.
14 @param VarName A Null-terminated Unicode string that is
15 the name of the vendor's variable.
17 @param VarGuid A unique identifier for the vendor.
19 @retval EFI_SUCCESS The variable was found and removed
20 @retval EFI_UNSUPPORTED The variable store was inaccessible
21 @retval EFI_NOT_FOUND The variable was not found
25 EfiLibDeleteVariable (
30 return gRT
->SetVariable (
40 Function is used to determine the number of device path instances
41 that exist in a device path.
44 @param DevicePath A pointer to a device path data structure.
46 @return This function counts and returns the number of device path instances
51 EfiDevicePathInstanceCount (
52 IN EFI_DEVICE_PATH_PROTOCOL
*DevicePath
59 while (GetNextDevicePathInstance (&DevicePath
, &Size
) != NULL
) {
67 Get a string from the Data Hub record based on
70 @param DevPath The device Path.
72 @return A string located from the Data Hub records based on
74 @retval NULL If failed to get the String from Data Hub.
78 EfiLibStrFromDatahub (
79 IN EFI_DEVICE_PATH_PROTOCOL
*DevPath