/** @file\r
FAT file system access routines for FAT recovery PEIM\r
\r
-Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
volume structure. Note there should be a valid Block device number\r
already set.\r
\r
- @param PrivateData Global memory map for accessing global \r
- variables. \r
- @param Volume On input, the BlockDeviceNumber field of the \r
- Volume should be a valid value. On successful \r
- output, all fields except the VolumeNumber \r
- field is initialized. \r
+ @param PrivateData Global memory map for accessing global\r
+ variables.\r
+ @param Volume On input, the BlockDeviceNumber field of the\r
+ Volume should be a valid value. On successful\r
+ output, all fields except the VolumeNumber\r
+ field is initialized.\r
\r
- @retval EFI_SUCCESS A FAT is found and the volume structure is \r
- initialized. \r
- @retval EFI_NOT_FOUND There is no FAT on the corresponding device. \r
+ @retval EFI_SUCCESS A FAT is found and the volume structure is\r
+ initialized.\r
+ @retval EFI_NOT_FOUND There is no FAT on the corresponding device.\r
@retval EFI_DEVICE_ERROR There is something error while accessing device.\r
\r
**/\r
/**\r
Gets the next cluster in the cluster chain\r
\r
- @param PrivateData Global memory map for accessing global variables \r
- @param Volume The volume \r
- @param Cluster The cluster \r
- @param NextCluster The cluster number of the next cluster \r
+ @param PrivateData Global memory map for accessing global variables\r
+ @param Volume The volume\r
+ @param Cluster The cluster\r
+ @param NextCluster The cluster number of the next cluster\r
\r
- @retval EFI_SUCCESS The address is got \r
- @retval EFI_INVALID_PARAMETER ClusterNo exceeds the MaxCluster of the volume. \r
+ @retval EFI_SUCCESS The address is got\r
+ @retval EFI_INVALID_PARAMETER ClusterNo exceeds the MaxCluster of the volume.\r
@retval EFI_DEVICE_ERROR Read disk error\r
\r
**/\r
/**\r
Set a file's CurrentPos and CurrentCluster, then compute StraightReadAmount.\r
\r
- @param PrivateData the global memory map \r
- @param File the file \r
- @param Pos the Position which is offset from the file's \r
- CurrentPos \r
+ @param PrivateData the global memory map\r
+ @param File the file\r
+ @param Pos the Position which is offset from the file's\r
+ CurrentPos\r
\r
- @retval EFI_SUCCESS Success. \r
- @retval EFI_INVALID_PARAMETER Pos is beyond file's size. \r
+ @retval EFI_SUCCESS Success.\r
+ @retval EFI_INVALID_PARAMETER Pos is beyond file's size.\r
@retval EFI_DEVICE_ERROR Something error while accessing media.\r
\r
**/\r
/**\r
Reads file data. Updates the file's CurrentPos.\r
\r
- @param PrivateData Global memory map for accessing global variables \r
- @param File The file. \r
- @param Size The amount of data to read. \r
- @param Buffer The buffer storing the data. \r
+ @param PrivateData Global memory map for accessing global variables\r
+ @param File The file.\r
+ @param Size The amount of data to read.\r
+ @param Buffer The buffer storing the data.\r
\r
- @retval EFI_SUCCESS The data is read. \r
- @retval EFI_INVALID_PARAMETER File is invalid. \r
+ @retval EFI_SUCCESS The data is read.\r
+ @retval EFI_INVALID_PARAMETER File is invalid.\r
@retval EFI_DEVICE_ERROR Something error while accessing media.\r
\r
**/\r
} else {\r
\r
if ((File->Attributes & FAT_ATTR_DIRECTORY) == 0) {\r
- Size = Size < (File->FileSize - File->CurrentPos) ? Size : (UINTN) (File->FileSize - File->CurrentPos);\r
+ Size = Size < (File->FileSize - File->CurrentPos) ? Size : (File->FileSize - File->CurrentPos);\r
}\r
//\r
// This is a normal cluster based file\r
The function updates the CurrentPos of the parent dir to after the item read.\r
If no more items were found, the function returns EFI_NOT_FOUND.\r
\r
- @param PrivateData Global memory map for accessing global variables \r
- @param ParentDir The parent directory. \r
- @param SubFile The File structure containing the sub file that \r
- is caught. \r
+ @param PrivateData Global memory map for accessing global variables\r
+ @param ParentDir The parent directory.\r
+ @param SubFile The File structure containing the sub file that\r
+ is caught.\r
\r
- @retval EFI_SUCCESS The next sub file is obtained. \r
- @retval EFI_INVALID_PARAMETER The ParentDir is not a directory. \r
- @retval EFI_NOT_FOUND No more sub file exists. \r
+ @retval EFI_SUCCESS The next sub file is obtained.\r
+ @retval EFI_INVALID_PARAMETER The ParentDir is not a directory.\r
+ @retval EFI_NOT_FOUND No more sub file exists.\r
@retval EFI_DEVICE_ERROR Something error while accessing media.\r
\r
**/\r