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

Go to the source code of this file.

Functions

EFI_STATUS EFIAPI FatFlushEx (IN EFI_FILE_PROTOCOL *FHand, IN EFI_FILE_IO_TOKEN *Token)
 
EFI_STATUS EFIAPI FatFlush (IN EFI_FILE_PROTOCOL *FHand)
 
EFI_STATUS EFIAPI FatClose (IN EFI_FILE_PROTOCOL *FHand)
 
EFI_STATUS FatIFileClose (FAT_IFILE *IFile)
 
EFI_STATUS FatOFileFlush (IN FAT_OFILE *OFile)
 
BOOLEAN FatCheckOFileRef (IN FAT_OFILE *OFile)
 
STATIC VOID FatCheckVolumeRef (IN FAT_VOLUME *Volume)
 
EFI_STATUS FatCleanupVolume (IN FAT_VOLUME *Volume, IN FAT_OFILE *OFile, IN EFI_STATUS EfiStatus, IN FAT_TASK *Task)
 
VOID FatSetVolumeError (IN FAT_OFILE *OFile, IN EFI_STATUS Status)
 

Detailed Description

Routines that check references and flush OFiles

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

Definition in file Flush.c.

Function Documentation

◆ FatCheckOFileRef()

BOOLEAN FatCheckOFileRef ( IN FAT_OFILE OFile)

Check the references of the OFile. If the OFile (that is checked) is no longer referenced, then it is freed.

Parameters
OFile- The OFile to be checked.
Return values
TRUE- The OFile is not referenced and freed.
FALSE- The OFile is kept.

Definition at line 295 of file Flush.c.

◆ FatCheckVolumeRef()

STATIC VOID FatCheckVolumeRef ( IN FAT_VOLUME Volume)

Check the references of all open files on the volume. Any open file (that is checked) that is no longer referenced, is freed - and its parent open file is then referenced checked.

Parameters
Volume- The volume to check the pending open file list.

Definition at line 337 of file Flush.c.

◆ FatCleanupVolume()

EFI_STATUS FatCleanupVolume ( IN FAT_VOLUME Volume,
IN FAT_OFILE OFile,
IN EFI_STATUS  EfiStatus,
IN FAT_TASK Task 
)

Set error status for a specific OFile, reference checking the volume. If volume is already marked as invalid, and all resources are freed after reference checking, the file system protocol is uninstalled and the volume structure is freed.

Parameters
Volume- the Volume that is to be reference checked and unlocked.
OFile- the OFile whose permanent error code is to be set.
EfiStatus- error code to be set.
Taskpoint to task instance.
Return values
EFI_SUCCESS- Clean up the volume successfully.
Returns
Others - Cleaning up of the volume is failed.

Definition at line 382 of file Flush.c.

◆ FatClose()

EFI_STATUS EFIAPI FatClose ( IN EFI_FILE_PROTOCOL FHand)

Flushes & Closes the file handle.

Parameters
FHand- Handle to the file to delete.
Return values
EFI_SUCCESS- Closed the file successfully.

Definition at line 129 of file Flush.c.

◆ FatFlush()

EFI_STATUS EFIAPI FatFlush ( IN EFI_FILE_PROTOCOL FHand)

Flushes all data associated with the file handle.

Parameters
FHand- Handle to file to flush.
Return values
EFI_SUCCESS- Flushed the file successfully.
EFI_WRITE_PROTECTED- The volume is read only.
EFI_ACCESS_DENIED- The file is read only.
Returns
Others - Flushing of the file failed.

Definition at line 111 of file Flush.c.

◆ FatFlushEx()

EFI_STATUS EFIAPI FatFlushEx ( IN EFI_FILE_PROTOCOL FHand,
IN EFI_FILE_IO_TOKEN Token 
)

Flushes all data associated with the file handle.

Parameters
FHand- Handle to file to flush.
Token- A pointer to the token associated with the transaction.
Return values
EFI_SUCCESS- Flushed the file successfully.
EFI_WRITE_PROTECTED- The volume is read only.
EFI_ACCESS_DENIED- The file is read only.
Returns
Others - Flushing of the file failed.

Definition at line 27 of file Flush.c.

◆ FatIFileClose()

EFI_STATUS FatIFileClose ( FAT_IFILE IFile)

Close the open file instance.

Parameters
IFile- Open file instance.
Return values
EFI_SUCCESS- Closed the file successfully.

Definition at line 173 of file Flush.c.

◆ FatOFileFlush()

EFI_STATUS FatOFileFlush ( IN FAT_OFILE OFile)

Flush the data associated with an open file. In this implementation, only last Mod/Access time is updated.

Parameters
OFile- The open file.
Return values
EFI_SUCCESS- The OFile is flushed successfully.
Returns
Others - An error occurred when flushing this OFile.

Definition at line 218 of file Flush.c.

◆ FatSetVolumeError()

VOID FatSetVolumeError ( IN FAT_OFILE OFile,
IN EFI_STATUS  Status 
)

Set the OFile and its child OFile with the error Status

Parameters
OFile- The OFile whose permanent error code is to be set.
Status- Error code to be set.

Definition at line 459 of file Flush.c.