OpenCore
1.0.4
OpenCore Bootloader
|
#include <Uefi.h>
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include <Library/DevicePathLib.h>
#include <Library/OcFileLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Protocol/DevicePath.h>
#include <Protocol/SimpleFileSystem.h>
Go to the source code of this file.
Functions | |
EFI_STATUS | OcSafeFileOpen (IN CONST EFI_FILE_PROTOCOL *Directory, OUT EFI_FILE_PROTOCOL **NewHandle, IN CONST CHAR16 *FileName, IN CONST UINT64 OpenMode, IN CONST UINT64 Attributes) |
EFI_STATUS EFIAPI | OcOpenFileByRemainingDevicePath (IN EFI_HANDLE FileSystemHandle, IN CONST EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath, OUT EFI_FILE_PROTOCOL **File, IN UINT64 OpenMode, IN UINT64 Attributes) |
EFI_STATUS EFIAPI | OcOpenFileByDevicePath (IN OUT EFI_DEVICE_PATH_PROTOCOL **FilePath, OUT EFI_FILE_PROTOCOL **File, IN UINT64 OpenMode, IN UINT64 Attributes) |
The UEFI Library provides functions and macros that simplify the development of UEFI Drivers and UEFI Applications. These functions and macros help manage EFI events, build simple locks utilizing EFI Task Priority Levels (TPLs), install EFI Driver Model related protocols, manage Unicode string tables for UEFI Drivers, and print messages on the console output and standard error devices. Copyright (c) 2006 - 2018, 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 OpenFile.c.
EFI_STATUS EFIAPI OcOpenFileByDevicePath | ( | IN OUT EFI_DEVICE_PATH_PROTOCOL ** | FilePath, |
OUT EFI_FILE_PROTOCOL ** | File, | ||
IN UINT64 | OpenMode, | ||
IN UINT64 | Attributes ) |
Open a file or directory by device path. This is a modified version of EfiOpenFileByDevicePath function, which handles paths with trailing slashes, that cause Open failure on old firmware. EfiOpenFileByDevicePath is additionally not available in UDK.
See more details at: https://github.com/tianocore/edk2/commit/768b611136d0f2b99a99e446c089d1a30c3fa5d5
[in,out] | FilePath | Device path protocol. |
[out] | File | Resulting file protocol. |
[in] | OpenMode | File open mode. |
[in] | Attributes | File attributes. |
EFI_SUCCESS | on succesful open. |
Definition at line 206 of file OpenFile.c.
EFI_STATUS EFIAPI OcOpenFileByRemainingDevicePath | ( | IN EFI_HANDLE | FileSystemHandle, |
IN CONST EFI_DEVICE_PATH_PROTOCOL * | RemainingDevicePath, | ||
OUT EFI_FILE_PROTOCOL ** | File, | ||
IN UINT64 | OpenMode, | ||
IN UINT64 | Attributes ) |
Open a file or directory by file system handle and path. See OcOpenFileByDevicePath() for more details.
[in] | FileSystemHandle | File System handle. |
[in] | RemainingDevicePath | The remaining Device Path (must be all file path nodes). |
[out] | File | Resulting file protocol. |
[in] | OpenMode | File open mode. |
[in] | Attributes | File attributes. |
EFI_SUCCESS | on succesful open. |
Definition at line 83 of file OpenFile.c.
EFI_STATUS OcSafeFileOpen | ( | IN CONST EFI_FILE_PROTOCOL * | Directory, |
OUT EFI_FILE_PROTOCOL ** | NewHandle, | ||
IN CONST CHAR16 * | FileName, | ||
IN CONST UINT64 | OpenMode, | ||
IN CONST UINT64 | Attributes ) |
Opens a new file relative to the source file's location. This function is equivalent to EFI_FILE_OPEN but has additional restrictions to provide board compatibility. Currently the only restriction is no trailing slash in the filename due to issues in FAT drivers.
Directory | File protocol instance of parent directory. |
NewHandle | Pointer for returned handle. |
FileName | Null-terminated file name or relative path. |
OpenMode | File open mode. |
Attributes | Attributes for the newly created file. |
EFI_SUCCESS | for successfully opened file. |
Definition at line 29 of file OpenFile.c.