TianoCore EDK2 master
|
#include "FatLitePeim.h"
Go to the source code of this file.
Functions | |
EFI_STATUS | FatGetBpbInfo (IN PEI_FAT_PRIVATE_DATA *PrivateData, IN OUT PEI_FAT_VOLUME *Volume) |
EFI_STATUS | FatGetNextCluster (IN PEI_FAT_PRIVATE_DATA *PrivateData, IN PEI_FAT_VOLUME *Volume, IN UINT32 Cluster, OUT UINT32 *NextCluster) |
EFI_STATUS | FatSetFilePos (IN PEI_FAT_PRIVATE_DATA *PrivateData, IN PEI_FAT_FILE *File, IN UINT32 Pos) |
EFI_STATUS | FatReadFile (IN PEI_FAT_PRIVATE_DATA *PrivateData, IN PEI_FAT_FILE *File, IN UINTN Size, OUT VOID *Buffer) |
EFI_STATUS | FatReadNextDirectoryEntry (IN PEI_FAT_PRIVATE_DATA *PrivateData, IN PEI_FAT_FILE *ParentDir, OUT PEI_FAT_FILE *SubFile) |
FAT file system access routines for FAT recovery PEIM
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file FatLiteAccess.c.
EFI_STATUS FatGetBpbInfo | ( | IN PEI_FAT_PRIVATE_DATA * | PrivateData, |
IN OUT PEI_FAT_VOLUME * | Volume | ||
) |
Check if there is a valid FAT in the corresponding Block device of the volume and if yes, fill in the relevant fields for the volume structure. Note there should be a valid Block device number already set.
PrivateData | Global memory map for accessing global variables. |
Volume | On input, the BlockDeviceNumber field of the Volume should be a valid value. On successful output, all fields except the VolumeNumber field is initialized. |
EFI_SUCCESS | A FAT is found and the volume structure is initialized. |
EFI_NOT_FOUND | There is no FAT on the corresponding device. |
EFI_DEVICE_ERROR | There is something error while accessing device. |
Definition at line 32 of file FatLiteAccess.c.
EFI_STATUS FatGetNextCluster | ( | IN PEI_FAT_PRIVATE_DATA * | PrivateData, |
IN PEI_FAT_VOLUME * | Volume, | ||
IN UINT32 | Cluster, | ||
OUT UINT32 * | NextCluster | ||
) |
Gets the next cluster in the cluster chain
PrivateData | Global memory map for accessing global variables |
Volume | The volume |
Cluster | The cluster |
NextCluster | The cluster number of the next cluster |
EFI_SUCCESS | The address is got |
EFI_INVALID_PARAMETER | ClusterNo exceeds the MaxCluster of the volume. |
EFI_DEVICE_ERROR | Read disk error |
Definition at line 187 of file FatLiteAccess.c.
EFI_STATUS FatReadFile | ( | IN PEI_FAT_PRIVATE_DATA * | PrivateData, |
IN PEI_FAT_FILE * | File, | ||
IN UINTN | Size, | ||
OUT VOID * | Buffer | ||
) |
Reads file data. Updates the file's CurrentPos.
PrivateData | Global memory map for accessing global variables |
File | The file. |
Size | The amount of data to read. |
Buffer | The buffer storing the data. |
EFI_SUCCESS | The data is read. |
EFI_INVALID_PARAMETER | File is invalid. |
EFI_DEVICE_ERROR | Something error while accessing media. |
Definition at line 349 of file FatLiteAccess.c.
EFI_STATUS FatReadNextDirectoryEntry | ( | IN PEI_FAT_PRIVATE_DATA * | PrivateData, |
IN PEI_FAT_FILE * | ParentDir, | ||
OUT PEI_FAT_FILE * | SubFile | ||
) |
This function reads the next item in the parent directory and initializes the output parameter SubFile (CurrentPos is initialized to 0). The function updates the CurrentPos of the parent dir to after the item read. If no more items were found, the function returns EFI_NOT_FOUND.
PrivateData | Global memory map for accessing global variables |
ParentDir | The parent directory. |
SubFile | The File structure containing the sub file that is caught. |
EFI_SUCCESS | The next sub file is obtained. |
EFI_INVALID_PARAMETER | The ParentDir is not a directory. |
EFI_NOT_FOUND | No more sub file exists. |
EFI_DEVICE_ERROR | Something error while accessing media. |
Definition at line 437 of file FatLiteAccess.c.
EFI_STATUS FatSetFilePos | ( | IN PEI_FAT_PRIVATE_DATA * | PrivateData, |
IN PEI_FAT_FILE * | File, | ||
IN UINT32 | Pos | ||
) |
Set a file's CurrentPos and CurrentCluster, then compute StraightReadAmount.
PrivateData | the global memory map |
File | the file |
Pos | the Position which is offset from the file's CurrentPos |
EFI_SUCCESS | Success. |
EFI_INVALID_PARAMETER | Pos is beyond file's size. |
EFI_DEVICE_ERROR | Something error while accessing media. |
Definition at line 263 of file FatLiteAccess.c.