TianoCore EDK2 master
Loading...
Searching...
No Matches
Open.c File Reference
#include "Fat.h"

Go to the source code of this file.

Functions

EFI_STATUS FatAllocateIFile (IN FAT_OFILE *OFile, OUT FAT_IFILE **PtrIFile)
 
EFI_STATUS FatOFileOpen (IN FAT_OFILE *OFile, OUT FAT_IFILE **NewIFile, IN CHAR16 *FileName, IN UINT64 OpenMode, IN UINT8 Attributes)
 
EFI_STATUS EFIAPI FatOpenEx (IN EFI_FILE_PROTOCOL *FHand, OUT EFI_FILE_PROTOCOL **NewHandle, IN CHAR16 *FileName, IN UINT64 OpenMode, IN UINT64 Attributes, IN OUT EFI_FILE_IO_TOKEN *Token)
 
EFI_STATUS EFIAPI FatOpen (IN EFI_FILE_PROTOCOL *FHand, OUT EFI_FILE_PROTOCOL **NewHandle, IN CHAR16 *FileName, IN UINT64 OpenMode, IN UINT64 Attributes)
 

Detailed Description

Routines dealing with file open.

Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file Open.c.

Function Documentation

◆ FatAllocateIFile()

EFI_STATUS FatAllocateIFile ( IN FAT_OFILE OFile,
OUT FAT_IFILE **  PtrIFile 
)

Create an Open instance for the existing OFile. The IFile of the newly opened file is passed out.

Parameters
OFile- The file that serves as a starting reference point.
PtrIFile- The newly generated IFile instance.
Return values
EFI_OUT_OF_RESOURCES- Can not allocate the memory for the IFile
EFI_SUCCESS- Create the new IFile for the OFile successfully

Definition at line 24 of file Open.c.

◆ FatOFileOpen()

EFI_STATUS FatOFileOpen ( IN FAT_OFILE OFile,
OUT FAT_IFILE **  NewIFile,
IN CHAR16 *  FileName,
IN UINT64  OpenMode,
IN UINT8  Attributes 
)

Open a file for a file name relative to an existing OFile. The IFile of the newly opened file is passed out.

Parameters
OFile- The file that serves as a starting reference point.
NewIFile- The newly generated IFile instance.
FileName- The file name relative to the OFile.
OpenMode- Open mode.
Attributes- Attributes to set if the file is created.
Return values
EFI_SUCCESS- Open the file successfully.
EFI_INVALID_PARAMETER- The open mode is conflict with the attributes or the file name is not valid.
EFI_NOT_FOUND- Conflicts between dir intention and attribute.
EFI_WRITE_PROTECTED- Can't open for write if the volume is read only.
EFI_ACCESS_DENIED- If the file's attribute is read only, and the open is for read-write fail it.
EFI_OUT_OF_RESOURCES- Can not allocate the memory.

Definition at line 85 of file Open.c.

◆ FatOpen()

EFI_STATUS EFIAPI FatOpen ( IN EFI_FILE_PROTOCOL FHand,
OUT EFI_FILE_PROTOCOL **  NewHandle,
IN CHAR16 *  FileName,
IN UINT64  OpenMode,
IN UINT64  Attributes 
)

Implements Open() of Simple File System Protocol.

Parameters
FHand- File handle of the file serves as a starting reference point.
NewHandle- Handle of the file that is newly opened.
FileName- File name relative to FHand.
OpenMode- Open mode.
Attributes- Attributes to set if the file is created.
Return values
EFI_INVALID_PARAMETER- The FileName is NULL or the file string is empty. The OpenMode is not supported. The Attributes is not the valid attributes.
EFI_OUT_OF_RESOURCES- Can not allocate the memory for file string.
EFI_SUCCESS- Open the file successfully.
Returns
Others - The status of open file.

Definition at line 318 of file Open.c.

◆ FatOpenEx()

EFI_STATUS EFIAPI FatOpenEx ( IN EFI_FILE_PROTOCOL FHand,
OUT EFI_FILE_PROTOCOL **  NewHandle,
IN CHAR16 *  FileName,
IN UINT64  OpenMode,
IN UINT64  Attributes,
IN OUT EFI_FILE_IO_TOKEN Token 
)

Implements OpenEx() of Simple File System Protocol.

Parameters
FHand- File handle of the file serves as a starting reference point.
NewHandle- Handle of the file that is newly opened.
FileName- File name relative to FHand.
OpenMode- Open mode.
Attributes- Attributes to set if the file is created.
Token- A pointer to the token associated with the transaction.:
Return values
EFI_INVALID_PARAMETER- The FileName is NULL or the file string is empty. The OpenMode is not supported. The Attributes is not the valid attributes.
EFI_OUT_OF_RESOURCES- Can not allocate the memory for file string.
EFI_SUCCESS- Open the file successfully.
Returns
Others - The status of open file.

Definition at line 200 of file Open.c.