TianoCore EDK2 master
|
#include "SecureBootConfigImpl.h"
Go to the source code of this file.
Functions | |
EFI_STATUS | ReadFileContent (IN EFI_FILE_HANDLE FileHandle, IN OUT VOID **BufferPtr, OUT UINTN *FileSize, IN UINTN AdditionAllocateSize) |
VOID | CloseFile (IN EFI_FILE_HANDLE FileHandle) |
EFI_STATUS EFIAPI | Int2OctStr (IN CONST UINTN *Integer, IN UINTN IntSizeInWords, OUT UINT8 *OctetString, IN UINTN OSSizeInBytes) |
UINTN | GuidToString (IN EFI_GUID *Guid, IN CHAR16 *Buffer, IN UINTN BufferSize) |
Helper functions for SecureBoot configuration module.
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file SecureBootConfigMisc.c.
VOID CloseFile | ( | IN EFI_FILE_HANDLE | FileHandle | ) |
Close an open file handle.
[in] | FileHandle | The file handle to close. |
Definition at line 95 of file SecureBootConfigMisc.c.
Worker function that prints an EFI_GUID into specified Buffer.
[in] | Guid | Pointer to GUID to print. |
[in] | Buffer | Buffer to print Guid into. |
[in] | BufferSize | Size of Buffer. |
Number | of characters printed. |
Definition at line 162 of file SecureBootConfigMisc.c.
EFI_STATUS EFIAPI Int2OctStr | ( | IN CONST UINTN * | Integer, |
IN UINTN | IntSizeInWords, | ||
OUT UINT8 * | OctetString, | ||
IN UINTN | OSSizeInBytes | ||
) |
Convert a nonnegative integer to an octet string of a specified length.
[in] | Integer | Pointer to the nonnegative integer to be converted |
[in] | IntSizeInWords | Length of integer buffer in words |
[out] | OctetString | Converted octet string of the specified length |
[in] | OSSizeInBytes | Intended length of resulting octet string in bytes |
Returns:
EFI_SUCCESS | Data conversion successfully |
EFI_BUFFER_TOOL_SMALL | Buffer is too small for output string |
Definition at line 120 of file SecureBootConfigMisc.c.
EFI_STATUS ReadFileContent | ( | IN EFI_FILE_HANDLE | FileHandle, |
IN OUT VOID ** | BufferPtr, | ||
OUT UINTN * | FileSize, | ||
IN UINTN | AdditionAllocateSize | ||
) |
Read file content into BufferPtr, the size of the allocate buffer is *FileSize plus AdditionAllocateSize.
[in] | FileHandle | The file to be read. |
[in,out] | BufferPtr | Pointers to the pointer of allocated buffer. |
[out] | FileSize | Size of input file |
[in] | AdditionAllocateSize | Addition size the buffer need to be allocated. In case the buffer need to contain others besides the file content. |
EFI_SUCCESS | The file was read into the buffer. |
EFI_INVALID_PARAMETER | A parameter was invalid. |
EFI_OUT_OF_RESOURCES | A memory allocation failed. |
others | Unexpected error. |
Definition at line 28 of file SecureBootConfigMisc.c.