TianoCore EDK2 master
|
#include "Fat.h"
Go to the source code of this file.
Functions | |
STATIC VOID * | FatLoadFatEntry (IN FAT_VOLUME *Volume, IN UINTN Index) |
STATIC UINTN | FatGetFatEntry (IN FAT_VOLUME *Volume, IN UINTN Index) |
STATIC EFI_STATUS | FatSetFatEntry (IN FAT_VOLUME *Volume, IN UINTN Index, IN UINTN Value) |
STATIC EFI_STATUS | FatFreeClusters (IN FAT_VOLUME *Volume, IN UINTN Cluster) |
STATIC UINTN | FatAllocateCluster (IN FAT_VOLUME *Volume) |
STATIC UINTN | FatSizeToClusters (IN FAT_VOLUME *Volume, IN UINTN Size) |
EFI_STATUS | FatShrinkEof (IN FAT_OFILE *OFile) |
EFI_STATUS | FatGrowEof (IN FAT_OFILE *OFile, IN UINT64 NewSizeInBytes) |
EFI_STATUS | FatOFilePosition (IN FAT_OFILE *OFile, IN UINTN Position, IN UINTN PosLimit) |
UINTN | FatPhysicalDirSize (IN FAT_VOLUME *Volume, IN UINTN Cluster) |
UINT64 | FatPhysicalFileSize (IN FAT_VOLUME *Volume, IN UINTN RealSize) |
VOID | FatComputeFreeInfo (IN FAT_VOLUME *Volume) |
Routines dealing with disk spaces and FAT table entries.
Copyright (c) 2005 - 2013, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file FileSpace.c.
STATIC UINTN FatAllocateCluster | ( | IN FAT_VOLUME * | Volume | ) |
Allocate a free cluster and return the cluster index.
Volume | - FAT file system volume. |
Definition at line 273 of file FileSpace.c.
VOID FatComputeFreeInfo | ( | IN FAT_VOLUME * | Volume | ) |
Update the free cluster info of FatInfoSector of the volume.
Volume | - FAT file system volume. |
Definition at line 720 of file FileSpace.c.
STATIC EFI_STATUS FatFreeClusters | ( | IN FAT_VOLUME * | Volume, |
IN UINTN | Cluster | ||
) |
Free the cluster chain.
Volume | - FAT file system volume. |
Cluster | - The first cluster of cluster chain. |
EFI_SUCCESS | - The cluster chain is freed successfully. |
EFI_VOLUME_CORRUPTED | - There are errors in the file's clusters. |
Definition at line 241 of file FileSpace.c.
Get the FAT entry value of the volume, which is identified with the Index.
Volume | - FAT file system volume. |
Index | - The index of the FAT entry of the volume. |
Definition at line 85 of file FileSpace.c.
EFI_STATUS FatGrowEof | ( | IN FAT_OFILE * | OFile, |
IN UINT64 | NewSizeInBytes | ||
) |
Grow the end of the open file base on the NewSizeInBytes.
OFile | - The open file. |
NewSizeInBytes | - The new size in bytes of the open file. |
EFI_SUCCESS | - The file is grown successfully. |
EFI_UNSUPPORTED | - The file size is larger than 4GB. |
EFI_VOLUME_CORRUPTED | - There are errors in the files' clusters. |
EFI_VOLUME_FULL | - The volume is full and can not grow the file. |
Definition at line 429 of file FileSpace.c.
STATIC VOID * FatLoadFatEntry | ( | IN FAT_VOLUME * | Volume, |
IN UINTN | Index | ||
) |
Get the FAT entry of the volume, which is identified with the Index.
Volume | - FAT file system volume. |
Index | - The index of the FAT entry of the volume. |
Definition at line 25 of file FileSpace.c.
Seek OFile to requested position, and calculate the number of consecutive clusters from the position in the file
OFile | - The open file. |
Position | - The file's position which will be accessed. |
PosLimit | - The maximum length current reading/writing may access |
EFI_SUCCESS | - Set the info successfully. |
EFI_VOLUME_CORRUPTED | - Cluster chain corrupt. |
Definition at line 562 of file FileSpace.c.
UINTN FatPhysicalDirSize | ( | IN FAT_VOLUME * | Volume, |
IN UINTN | Cluster | ||
) |
Get the size of directory of the open file.
Volume | - The File System Volume. |
Cluster | - The Starting cluster. |
Definition at line 654 of file FileSpace.c.
UINT64 FatPhysicalFileSize | ( | IN FAT_VOLUME * | Volume, |
IN UINTN | RealSize | ||
) |
Get the physical size of a file on the disk.
Volume | - The file system volume. |
RealSize | - The real size of a file. |
Definition at line 699 of file FileSpace.c.
STATIC EFI_STATUS FatSetFatEntry | ( | IN FAT_VOLUME * | Volume, |
IN UINTN | Index, | ||
IN UINTN | Value | ||
) |
Set the FAT entry value of the volume, which is identified with the Index.
Volume | - FAT file system volume. |
Index | - The index of the FAT entry of the volume. |
Value | - The new value of the FAT entry. |
EFI_SUCCESS | - Set the new FAT entry value successfully. |
EFI_VOLUME_CORRUPTED | - The FAT type of the volume is error. |
Definition at line 140 of file FileSpace.c.
EFI_STATUS FatShrinkEof | ( | IN FAT_OFILE * | OFile | ) |
Shrink the end of the open file base on the file size.
OFile | - The open file. |
EFI_SUCCESS | - Shrinked successfully. |
EFI_VOLUME_CORRUPTED | - There are errors in the file's clusters. |
Definition at line 355 of file FileSpace.c.
Count the number of clusters given a size.
Volume | - The file system volume. |
Size | - The size in bytes. |
Definition at line 329 of file FileSpace.c.