VirtualBox

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

Last change on this file since 77662 was 77662, checked in by vboxsync, 6 years ago

EFI: First step in UDK2018 merge. Does not build yet.

  • Property svn:eol-style set to native
File size: 2.1 KB
Line 
1/** @file
2Utility routines used by boot maintenance modules.
3
4Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>
5This program and the accompanying materials
6are licensed and made available under the terms and conditions of the BSD License
7which accompanies this distribution. The full text of the license may be found at
8http://opensource.org/licenses/bsd-license.php
9
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13**/
14
15#include "BootMaintenanceManager.h"
16
17/**
18 Function deletes the variable specified by VarName and VarGuid.
19
20 @param VarName A Null-terminated Unicode string that is
21 the name of the vendor's variable.
22
23 @param VarGuid A unique identifier for the vendor.
24
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
28
29**/
30EFI_STATUS
31EfiLibDeleteVariable (
32 IN CHAR16 *VarName,
33 IN EFI_GUID *VarGuid
34 )
35{
36 return gRT->SetVariable (
37 VarName,
38 VarGuid,
39 0,
40 0,
41 NULL
42 );
43}
44
45/**
46 Function is used to determine the number of device path instances
47 that exist in a device path.
48
49
50 @param DevicePath A pointer to a device path data structure.
51
52 @return This function counts and returns the number of device path instances
53 in DevicePath.
54
55**/
56UINTN
57EfiDevicePathInstanceCount (
58 IN EFI_DEVICE_PATH_PROTOCOL *DevicePath
59 )
60{
61 UINTN Count;
62 UINTN Size;
63
64 Count = 0;
65 while (GetNextDevicePathInstance (&DevicePath, &Size) != NULL) {
66 Count += 1;
67 }
68
69 return Count;
70}
71
72/**
73 Get a string from the Data Hub record based on
74 a device path.
75
76 @param DevPath The device Path.
77
78 @return A string located from the Data Hub records based on
79 the device path.
80 @retval NULL If failed to get the String from Data Hub.
81
82**/
83UINT16 *
84EfiLibStrFromDatahub (
85 IN EFI_DEVICE_PATH_PROTOCOL *DevPath
86 )
87{
88 return NULL;
89}
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