-/*++\r
+/** @file\r
+ Main header file for EFI FAT file system driver.\r
\r
Copyright (c) 2005 - 2013, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials are licensed and made available\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
-\r
-Module Name:\r
-\r
- Fat.h\r
-\r
-Abstract:\r
-\r
- Main header file for EFI FAT file system driver\r
-\r
-Revision History\r
-\r
---*/\r
+**/\r
\r
#ifndef _FAT_H_\r
#define _FAT_H_\r
//\r
// Function Prototypes\r
//\r
+\r
+/**\r
+\r
+ Implements Open() of Simple File System Protocol.\r
+\r
+ @param FHand - File handle of the file serves as a starting reference point.\r
+ @param NewHandle - Handle of the file that is newly opened.\r
+ @param FileName - File name relative to FHand.\r
+ @param OpenMode - Open mode.\r
+ @param Attributes - Attributes to set if the file is created.\r
+\r
+\r
+ @retval EFI_INVALID_PARAMETER - The FileName is NULL or the file string is empty.\r
+ The OpenMode is not supported.\r
+ The Attributes is not the valid attributes.\r
+ @retval EFI_OUT_OF_RESOURCES - Can not allocate the memory for file string.\r
+ @retval EFI_SUCCESS - Open the file successfully.\r
+ @return Others - The status of open file.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
FatOpen (\r
IN UINT64 OpenMode,\r
IN UINT64 Attributes\r
)\r
-/*++\r
-Routine Description:\r
-\r
- Implements Open() of Simple File System Protocol.\r
+;\r
\r
-Arguments:\r
+/**\r
\r
- FHand - File handle of the file serves as a starting reference point.\r
- NewHandle - Handle of the file that is newly opened.\r
- FileName - File name relative to FHand.\r
- OpenMode - Open mode.\r
- Attributes - Attributes to set if the file is created.\r
+ Implements OpenEx() of Simple File System Protocol.\r
\r
-Returns:\r
+ @param FHand - File handle of the file serves as a starting reference point.\r
+ @param NewHandle - Handle of the file that is newly opened.\r
+ @param FileName - File name relative to FHand.\r
+ @param OpenMode - Open mode.\r
+ @param Attributes - Attributes to set if the file is created.\r
+ @param Token - A pointer to the token associated with the transaction.\r
\r
- EFI_INVALID_PARAMETER - The FileName is NULL or the file string is empty.\r
+ @retval EFI_INVALID_PARAMETER - The FileName is NULL or the file string is empty.\r
The OpenMode is not supported.\r
The Attributes is not the valid attributes.\r
- EFI_OUT_OF_RESOURCES - Can not allocate the memory for file string.\r
- EFI_SUCCESS - Open the file successfully.\r
- Others - The status of open file.\r
-\r
---*/\r
-;\r
+ @retval EFI_OUT_OF_RESOURCES - Can not allocate the memory for file string.\r
+ @retval EFI_SUCCESS - Open the file successfully.\r
+ @return Others - The status of open file.\r
\r
+**/\r
EFI_STATUS\r
EFIAPI\r
FatOpenEx (\r
IN UINT64 Attributes,\r
IN OUT EFI_FILE_IO_TOKEN *Token\r
)\r
-/*++\r
-Routine Description:\r
-\r
- Implements OpenEx() of Simple File System Protocol.\r
-\r
-Arguments:\r
+;\r
\r
- FHand - File handle of the file serves as a starting reference point.\r
- NewHandle - Handle of the file that is newly opened.\r
- FileName - File name relative to FHand.\r
- OpenMode - Open mode.\r
- Attributes - Attributes to set if the file is created.\r
- Token - A pointer to the token associated with the transaction.\r
+/**\r
\r
-Returns:\r
+ Get the file's position of the file\r
\r
- EFI_INVALID_PARAMETER - The FileName is NULL or the file string is empty.\r
- The OpenMode is not supported.\r
- The Attributes is not the valid attributes.\r
- EFI_OUT_OF_RESOURCES - Can not allocate the memory for file string.\r
- EFI_SUCCESS - Open the file successfully.\r
- Others - The status of open file.\r
+ @param FHand - The handle of file.\r
+ @param Position - The file's position of the file.\r
\r
---*/\r
-;\r
+ @retval EFI_SUCCESS - Get the info successfully.\r
+ @retval EFI_DEVICE_ERROR - Can not find the OFile for the file.\r
+ @retval EFI_UNSUPPORTED - The open file is not a file.\r
\r
+**/\r
EFI_STATUS\r
EFIAPI\r
FatGetPosition (\r
IN EFI_FILE_PROTOCOL *FHand,\r
OUT UINT64 *Position\r
)\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Get the file's position of the file\r
-\r
-Arguments:\r
+;\r
\r
- FHand - The handle of file.\r
- Position - The file's position of the file.\r
+/**\r
\r
-Returns:\r
+ Get the some types info of the file into Buffer\r
\r
- EFI_SUCCESS - Get the info successfully.\r
- EFI_DEVICE_ERROR - Can not find the OFile for the file.\r
- EFI_UNSUPPORTED - The open file is not a file.\r
+ @param FHand - The handle of file.\r
+ @param Type - The type of the info.\r
+ @param BufferSize - Size of Buffer.\r
+ @param Buffer - Buffer containing volume info.\r
\r
---*/\r
-;\r
+ @retval EFI_SUCCESS - Get the info successfully.\r
+ @retval EFI_DEVICE_ERROR - Can not find the OFile for the file.\r
\r
+**/\r
EFI_STATUS\r
EFIAPI\r
FatGetInfo (\r
IN OUT UINTN *BufferSize,\r
OUT VOID *Buffer\r
)\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Get the some types info of the file into Buffer\r
-\r
-Arguments:\r
+;\r
\r
- FHand - The handle of file.\r
- Type - The type of the info.\r
- BufferSize - Size of Buffer.\r
- Buffer - Buffer containing volume info.\r
+/**\r
\r
-Returns:\r
+ Set the some types info of the file into Buffer.\r
\r
- EFI_SUCCESS - Get the info successfully.\r
- EFI_DEVICE_ERROR - Can not find the OFile for the file.\r
+ @param FHand - The handle of file.\r
+ @param Type - The type of the info.\r
+ @param BufferSize - Size of Buffer.\r
+ @param Buffer - Buffer containing volume info.\r
\r
---*/\r
-;\r
+ @retval EFI_SUCCESS - Set the info successfully.\r
+ @retval EFI_DEVICE_ERROR - Can not find the OFile for the file.\r
\r
+**/\r
EFI_STATUS\r
EFIAPI\r
FatSetInfo (\r
IN UINTN BufferSize,\r
IN VOID *Buffer\r
)\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Set the some types info of the file into Buffer\r
-\r
-Arguments:\r
+;\r
\r
- FHand - The handle of file.\r
- Type - The type of the info.\r
- BufferSize - Size of Buffer.\r
- Buffer - Buffer containing volume info.\r
+/**\r
\r
-Returns:\r
+ Flushes all data associated with the file handle.\r
\r
- EFI_SUCCESS - Set the info successfully.\r
- EFI_DEVICE_ERROR - Can not find the OFile for the file.\r
+ @param FHand - Handle to file to flush\r
\r
---*/\r
-;\r
+ @retval EFI_SUCCESS - Flushed the file successfully\r
+ @retval EFI_WRITE_PROTECTED - The volume is read only\r
+ @retval EFI_ACCESS_DENIED - The volume is not read only\r
+ but the file is read only\r
+ @return Others - Flushing of the file is failed\r
\r
+**/\r
EFI_STATUS\r
EFIAPI\r
FatFlush (\r
IN EFI_FILE_PROTOCOL *FHand\r
)\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Flushes all data associated with the file handle\r
-\r
-Arguments:\r
+;\r
\r
- FHand - Handle to file to flush\r
+/**\r
\r
-Returns:\r
+ Flushes all data associated with the file handle.\r
\r
- EFI_SUCCESS - Flushed the file successfully\r
- EFI_WRITE_PROTECTED - The volume is read only\r
- EFI_ACCESS_DENIED - The volume is not read only\r
- but the file is read only\r
- Others - Flushing of the file is failed\r
+ @param FHand - Handle to file to flush.\r
+ @param Token - A pointer to the token associated with the transaction.\r
\r
---*/\r
-;\r
+ @retval EFI_SUCCESS - Flushed the file successfully.\r
+ @retval EFI_WRITE_PROTECTED - The volume is read only.\r
+ @retval EFI_ACCESS_DENIED - The file is read only.\r
+ @return Others - Flushing of the file failed.\r
\r
+**/\r
EFI_STATUS\r
EFIAPI\r
FatFlushEx (\r
IN EFI_FILE_PROTOCOL *FHand,\r
IN EFI_FILE_IO_TOKEN *Token\r
)\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Flushes all data associated with the file handle.\r
-\r
-Arguments:\r
+;\r
\r
- FHand - Handle to file to flush.\r
- Token - A pointer to the token associated with the transaction.\r
+/**\r
\r
-Returns:\r
+ Flushes & Closes the file handle.\r
\r
- EFI_SUCCESS - Flushed the file successfully.\r
- EFI_WRITE_PROTECTED - The volume is read only.\r
- EFI_ACCESS_DENIED - The file is read only.\r
- Others - Flushing of the file failed.\r
+ @param FHand - Handle to the file to delete.\r
\r
---*/\r
-;\r
+ @retval EFI_SUCCESS - Closed the file successfully.\r
\r
+**/\r
EFI_STATUS\r
EFIAPI\r
FatClose (\r
IN EFI_FILE_PROTOCOL *FHand\r
)\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Flushes & Closes the file handle.\r
-\r
-Arguments:\r
+;\r
\r
- FHand - Handle to the file to delete.\r
+/**\r
\r
-Returns:\r
+ Deletes the file & Closes the file handle.\r
\r
- EFI_SUCCESS - Closed the file successfully.\r
+ @param FHand - Handle to the file to delete.\r
\r
---*/\r
-;\r
+ @retval EFI_SUCCESS - Delete the file successfully.\r
+ @retval EFI_WARN_DELETE_FAILURE - Fail to delete the file.\r
\r
+**/\r
EFI_STATUS\r
EFIAPI\r
FatDelete (\r
IN EFI_FILE_PROTOCOL *FHand\r
)\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Deletes the file & Closes the file handle.\r
-\r
-Arguments:\r
+;\r
\r
- FHand - Handle to the file to delete.\r
+/**\r
\r
-Returns:\r
+ Set the file's position of the file.\r
\r
- EFI_SUCCESS - Delete the file successfully.\r
- EFI_WARN_DELETE_FAILURE - Fail to delete the file.\r
+ @param FHand - The handle of file\r
+ @param Position - The file's position of the file\r
\r
---*/\r
-;\r
+ @retval EFI_SUCCESS - Set the info successfully\r
+ @retval EFI_DEVICE_ERROR - Can not find the OFile for the file\r
+ @retval EFI_UNSUPPORTED - Set a directory with a not-zero position\r
\r
+**/\r
EFI_STATUS\r
EFIAPI\r
FatSetPosition (\r
IN EFI_FILE_PROTOCOL *FHand,\r
IN UINT64 Position\r
)\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Set the file's position of the file\r
+;\r
\r
-Arguments:\r
+/**\r
\r
- FHand - The handle of file\r
- Position - The file's position of the file\r
+ Get the file info.\r
\r
-Returns:\r
+ @param FHand - The handle of the file.\r
+ @param BufferSize - Size of Buffer.\r
+ @param Buffer - Buffer containing read data.\r
\r
- EFI_SUCCESS - Set the info successfully\r
- EFI_DEVICE_ERROR - Can not find the OFile for the file\r
- EFI_UNSUPPORTED - Set a directory with a not-zero position\r
-\r
---*/\r
-;\r
+ @retval EFI_SUCCESS - Get the file info successfully.\r
+ @retval EFI_DEVICE_ERROR - Can not find the OFile for the file.\r
+ @retval EFI_VOLUME_CORRUPTED - The file type of open file is error.\r
+ @return other - An error occurred when operation the disk.\r
\r
+**/\r
EFI_STATUS\r
EFIAPI\r
FatRead (\r
IN OUT UINTN *BufferSize,\r
OUT VOID *Buffer\r
)\r
-/*++\r
+;\r
\r
-Routine Description:\r
+/**\r
\r
Get the file info.\r
\r
-Arguments:\r
-\r
- FHand - The handle of the file.\r
- BufferSize - Size of Buffer.\r
- Buffer - Buffer containing read data.\r
+ @param FHand - The handle of the file.\r
+ @param Token - A pointer to the token associated with the transaction.\r
\r
-Returns:\r
-\r
- EFI_SUCCESS - Get the file info successfully.\r
- EFI_DEVICE_ERROR - Can not find the OFile for the file.\r
- EFI_VOLUME_CORRUPTED - The file type of open file is error.\r
- other - An error occurred when operation the disk.\r
-\r
---*/\r
-;\r
+ @retval EFI_SUCCESS - Get the file info successfully.\r
+ @retval EFI_DEVICE_ERROR - Can not find the OFile for the file.\r
+ @retval EFI_VOLUME_CORRUPTED - The file type of open file is error.\r
+ @return other - An error occurred when operation the disk.\r
\r
+**/\r
EFI_STATUS\r
EFIAPI\r
FatReadEx (\r
IN EFI_FILE_PROTOCOL *FHand,\r
IN OUT EFI_FILE_IO_TOKEN *Token\r
)\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Get the file info.\r
-\r
-Arguments:\r
+;\r
\r
- FHand - The handle of the file.\r
- Token - A pointer to the token associated with the transaction.\r
+/**\r
\r
-Returns:\r
+ Set the file info.\r
\r
- EFI_SUCCESS - Get the file info successfully.\r
- EFI_DEVICE_ERROR - Can not find the OFile for the file.\r
- EFI_VOLUME_CORRUPTED - The file type of open file is error.\r
- other - An error occurred when operation the disk.\r
+ @param FHand - The handle of the file.\r
+ @param BufferSize - Size of Buffer.\r
+ @param Buffer - Buffer containing write data.\r
\r
---*/\r
-;\r
+ @retval EFI_SUCCESS - Set the file info successfully.\r
+ @retval EFI_WRITE_PROTECTED - The disk is write protected.\r
+ @retval EFI_ACCESS_DENIED - The file is read-only.\r
+ @retval EFI_DEVICE_ERROR - The OFile is not valid.\r
+ @retval EFI_UNSUPPORTED - The open file is not a file.\r
+ - The writing file size is larger than 4GB.\r
+ @return other - An error occurred when operation the disk.\r
\r
+**/\r
EFI_STATUS\r
EFIAPI\r
FatWrite (\r
IN OUT UINTN *BufferSize,\r
IN VOID *Buffer\r
)\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Set the file info.\r
+;\r
\r
-Arguments:\r
+/**\r
\r
- FHand - The handle of the file.\r
- BufferSize - Size of Buffer.\r
- Buffer - Buffer containing write data.\r
+ Get the file info.\r
\r
-Returns:\r
+ @param FHand - The handle of the file.\r
+ @param Token - A pointer to the token associated with the transaction.\r
\r
- EFI_SUCCESS - Set the file info successfully.\r
- EFI_WRITE_PROTECTED - The disk is write protected.\r
- EFI_ACCESS_DENIED - The file is read-only.\r
- EFI_DEVICE_ERROR - The OFile is not valid.\r
- EFI_UNSUPPORTED - The open file is not a file.\r
- - The writing file size is larger than 4GB.\r
- other - An error occurred when operation the disk.\r
-\r
---*/\r
-;\r
+ @retval EFI_SUCCESS - Get the file info successfully.\r
+ @retval EFI_DEVICE_ERROR - Can not find the OFile for the file.\r
+ @retval EFI_VOLUME_CORRUPTED - The file type of open file is error.\r
+ @return other - An error occurred when operation the disk.\r
\r
+**/\r
EFI_STATUS\r
EFIAPI\r
FatWriteEx (\r
IN EFI_FILE_PROTOCOL *FHand,\r
IN OUT EFI_FILE_IO_TOKEN *Token\r
)\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Get the file info.\r
-\r
-Arguments:\r
-\r
- FHand - The handle of the file.\r
- Token - A pointer to the token associated with the transaction.\r
-\r
-Returns:\r
-\r
- EFI_SUCCESS - Get the file info successfully.\r
- EFI_DEVICE_ERROR - Can not find the OFile for the file.\r
- EFI_VOLUME_CORRUPTED - The file type of open file is error.\r
- other - An error occurred when operation the disk.\r
-\r
---*/\r
;\r
\r
//\r