OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
BdsMisc.c File Reference
#include <Library/BaseMemoryLib.h>
#include <Library/DevicePathLib.h>
#include <Library/DuetBdsLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>

Go to the source code of this file.

Functions

VOID *EFIAPI BdsLibGetVariableAndSize (IN CHAR16 *Name, IN EFI_GUID *VendorGuid, OUT UINTN *VariableSize)
 
EFI_DEVICE_PATH_PROTOCOL *EFIAPI BdsLibDelPartMatchInstance (IN EFI_DEVICE_PATH_PROTOCOL *Multi, IN EFI_DEVICE_PATH_PROTOCOL *Single)
 
BOOLEAN EFIAPI BdsLibMatchDevicePaths (IN EFI_DEVICE_PATH_PROTOCOL *Multi, IN EFI_DEVICE_PATH_PROTOCOL *Single)
 

Detailed Description

Misc BDS library function

Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

Definition in file BdsMisc.c.

Function Documentation

◆ BdsLibDelPartMatchInstance()

EFI_DEVICE_PATH_PROTOCOL *EFIAPI BdsLibDelPartMatchInstance ( IN EFI_DEVICE_PATH_PROTOCOL * Multi,
IN EFI_DEVICE_PATH_PROTOCOL * Single )

Delete the instance in Multi which matches partly with Single instance

Parameters
MultiA pointer to a multi-instance device path data structure.
SingleA pointer to a single-instance device path data structure.
Returns
This function will remove the device path instances in Multi which partly match with the Single, and return the result device path. If there is no remaining device path as a result, this function will return NULL.

Definition at line 93 of file BdsMisc.c.

◆ BdsLibGetVariableAndSize()

VOID *EFIAPI BdsLibGetVariableAndSize ( IN CHAR16 * Name,
IN EFI_GUID * VendorGuid,
OUT UINTN * VariableSize )

Read the EFI variable (VendorGuid/Name) and return a dynamically allocated buffer, and the size of the buffer. If failure return NULL.

Parameters
NameString part of EFI variable name
VendorGuidGUID part of EFI variable name
VariableSizeReturns the size of the EFI variable that was read
Returns
Dynamically allocated memory that contains a copy of the EFI variable Caller is responsible freeing the buffer.
Return values
NULLVariable was not read

Definition at line 36 of file BdsMisc.c.

◆ BdsLibMatchDevicePaths()

BOOLEAN EFIAPI BdsLibMatchDevicePaths ( IN EFI_DEVICE_PATH_PROTOCOL * Multi,
IN EFI_DEVICE_PATH_PROTOCOL * Single )

Function compares a device path data structure to that of all the nodes of a second device path instance.

Parameters
MultiA pointer to a multi-instance device path data structure.
SingleA pointer to a single-instance device path data structure.
Return values
TRUEIf the Single device path is contained within Multi device path.
FALSEThe Single device path is not match within Multi device path.

Definition at line 153 of file BdsMisc.c.