OpenCore
1.0.4
OpenCore Bootloader
|
#include <Uefi.h>
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Protocol/LoadedImage.h>
#include <Protocol/ShellParameters.h>
Go to the source code of this file.
Functions | |
EFI_STATUS | GetArguments (OUT UINTN *Argc, OUT CHAR16 ***Argv) |
EFI_STATUS | OcUninstallAllProtocolInstances (EFI_GUID *Protocol) |
EFI_STATUS | OcHandleProtocolFallback (IN EFI_HANDLE Handle, IN EFI_GUID *Protocol, OUT VOID **Interface) |
UINTN | OcCountProtocolInstances (IN EFI_GUID *Protocol) |
VOID * | OcGetProtocol (IN EFI_GUID *Protocol, IN UINTN ErrorLevel, IN CONST CHAR8 *CallerName OPTIONAL, IN CONST CHAR8 *ProtocolName OPTIONAL) |
Copyright (C) 2019, vit9696. All rights reserved.
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 ProtocolSupport.c.
EFI_STATUS GetArguments | ( | OUT UINTN * | Argc, |
OUT CHAR16 *** | Argv ) |
Obtain application arguments.
[out] | Argc | Argument count. |
[out] | Argv | Argument list. |
EFI_SUCCESS | on success. |
Definition at line 25 of file ProtocolSupport.c.
UINTN OcCountProtocolInstances | ( | IN EFI_GUID * | Protocol | ) |
Count instances found under a specific protocol.
[in] | Protocol | Protocol to search for. |
Definition at line 149 of file ProtocolSupport.c.
VOID * OcGetProtocol | ( | IN EFI_GUID * | Protocol, |
IN UINTN | ErrorLevel, | ||
IN CONST CHAR8 *CallerName | OPTIONAL, | ||
IN CONST CHAR8 *ProtocolName | OPTIONAL ) |
Obtain protocol. If not obtained returns NULL, and optionally adds log message "[CallerName] cannot get protocol [ProtocolName] - %r".
[in] | Protocol | Protocol to search for. |
[in] | ErrorLevel | The error level of the debug log message to print if protocol not found. Send zero to generate no log message (caller becomes reponsible). |
[in] | CallerName | The caller name for the error message; should always be provided if ErrorLevel is non-zero; will work, but with less useful log output, if ommitted in that case. |
[in] | ProtocolName | The protocol name for the error message; optional, protocol GUID will be used as protocol name in error message when required, otherwise. |
Definition at line 179 of file ProtocolSupport.c.
EFI_STATUS OcHandleProtocolFallback | ( | IN EFI_HANDLE | Handle, |
IN EFI_GUID * | Protocol, | ||
OUT VOID ** | Interface ) |
Handle protocol on handle and fallback to any protocol when missing.
[in] | Handle | Handle to search for protocol. |
[in] | Protocol | Protocol to search for. |
[out] | Interface | Protocol interface if found. |
EFI_SUCCESS | on success. |
Definition at line 124 of file ProtocolSupport.c.
EFI_STATUS OcUninstallAllProtocolInstances | ( | EFI_GUID * | Protocol | ) |
Uninstall all protocols with the specified GUID.
[in] | Protocol | The published unique identifier of the protocol. It is the caller's responsibility to pass in a valid GUID. |
EFI_SUCCESS | on success. |
Definition at line 70 of file ProtocolSupport.c.