]> git.proxmox.com Git - mirror_edk2.git/blobdiff - FatPkg/EnhancedFatDxe/Fat.h
FatPkg/EnhancedFatDxe: Make the comments align with EDKIIcoding style
[mirror_edk2.git] / FatPkg / EnhancedFatDxe / Fat.h
index f49acee24e65eeec87beec48f6c45de72c15e82c..9490868ea756a8e8c9a549d561b8d48e345a438f 100644 (file)
@@ -1,4 +1,5 @@
-/*++\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
@@ -9,18 +10,7 @@ http://opensource.org/licenses/bsd-license.php
 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
@@ -396,6 +386,26 @@ struct _FAT_VOLUME {
 //\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
@@ -405,31 +415,27 @@ FatOpen (
   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
@@ -440,58 +446,41 @@ FatOpenEx (
   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
@@ -500,27 +489,21 @@ FatGetInfo (
   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
@@ -529,151 +512,116 @@ FatSetInfo (
   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
@@ -681,55 +629,46 @@ FatRead (
   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
@@ -737,56 +676,27 @@ FatWrite (
   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