VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BmLib.c@ 80922

Last change on this file since 80922 was 80721, checked in by vboxsync, 5 years ago

Devices/EFI/FirmwareNew: Start upgrade process to edk2-stable201908 (compiles on Windows and works to some extent), bugref:4643

  • Property svn:eol-style set to native
File size: 1.8 KB
Line 
1/** @file
2Utility routines used by boot maintenance modules.
3
4Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
5SPDX-License-Identifier: BSD-2-Clause-Patent
6
7**/
8
9#include "BootMaintenanceManager.h"
10
11/**
12 Function deletes the variable specified by VarName and VarGuid.
13
14 @param VarName A Null-terminated Unicode string that is
15 the name of the vendor's variable.
16
17 @param VarGuid A unique identifier for the vendor.
18
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
22
23**/
24EFI_STATUS
25EfiLibDeleteVariable (
26 IN CHAR16 *VarName,
27 IN EFI_GUID *VarGuid
28 )
29{
30 return gRT->SetVariable (
31 VarName,
32 VarGuid,
33 0,
34 0,
35 NULL
36 );
37}
38
39/**
40 Function is used to determine the number of device path instances
41 that exist in a device path.
42
43
44 @param DevicePath A pointer to a device path data structure.
45
46 @return This function counts and returns the number of device path instances
47 in DevicePath.
48
49**/
50UINTN
51EfiDevicePathInstanceCount (
52 IN EFI_DEVICE_PATH_PROTOCOL *DevicePath
53 )
54{
55 UINTN Count;
56 UINTN Size;
57
58 Count = 0;
59 while (GetNextDevicePathInstance (&DevicePath, &Size) != NULL) {
60 Count += 1;
61 }
62
63 return Count;
64}
65
66/**
67 Get a string from the Data Hub record based on
68 a device path.
69
70 @param DevPath The device Path.
71
72 @return A string located from the Data Hub records based on
73 the device path.
74 @retval NULL If failed to get the String from Data Hub.
75
76**/
77UINT16 *
78EfiLibStrFromDatahub (
79 IN EFI_DEVICE_PATH_PROTOCOL *DevPath
80 )
81{
82 return NULL;
83}
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette