]> git.proxmox.com Git - mirror_edk2.git/blobdiff - FatPkg/EnhancedFatDxe/Info.c
FatPkg/EnhancedFatDxe: Make the comments align with EDKIIcoding style
[mirror_edk2.git] / FatPkg / EnhancedFatDxe / Info.c
index aa1b0f245c593b8807563308bd9019aba5b20957..1a7f8280bab1596a2ca3a4d00ac12ecc38ddb5ec 100644 (file)
@@ -1,4 +1,5 @@
-/*++\r
+/** @file\r
+  Routines dealing with setting/getting file/volume info\r
 \r
 Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials are licensed and made available\r
@@ -10,17 +11,8 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 \r
-Module Name:\r
-\r
-  Info.c\r
-\r
-Abstract:\r
-\r
-  Routines dealing with setting/getting file/volume info\r
-\r
-Revision History\r
 \r
---*/\r
+**/\r
 \r
 #include "Fat.h"\r
 \r
@@ -47,58 +39,46 @@ FatSetOrGetInfo (
   IN OUT VOID             *Buffer\r
   );\r
 \r
+/**\r
+\r
+  Get the open file's info into Buffer.\r
+\r
+  @param  OFile                 - The open file.\r
+  @param  BufferSize            - Size of Buffer.\r
+  @param  Buffer                - Buffer containing file info.\r
+\r
+  @retval EFI_SUCCESS           - Get the file info successfully.\r
+  @retval EFI_BUFFER_TOO_SMALL  - The buffer is too small.\r
+\r
+**/\r
 EFI_STATUS\r
 FatGetFileInfo (\r
   IN FAT_OFILE        *OFile,\r
   IN OUT UINTN        *BufferSize,\r
   OUT VOID            *Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Get the open file's info into Buffer.\r
-\r
-Arguments:\r
+{\r
+  return FatGetDirEntInfo (OFile->Volume, OFile->DirEnt, BufferSize, Buffer);\r
+}\r
 \r
-  OFile                 - The open file.\r
-  BufferSize            - Size of Buffer.\r
-  Buffer                - Buffer containing file info.\r
+/**\r
 \r
-Returns:\r
+  Get the volume's info into Buffer.\r
 \r
-  EFI_SUCCESS           - Get the file info successfully.\r
-  EFI_BUFFER_TOO_SMALL  - The buffer is too small.\r
+  @param  Volume                - FAT file system volume.\r
+  @param  BufferSize            - Size of Buffer.\r
+  @param  Buffer                - Buffer containing volume info.\r
 \r
---*/\r
-{\r
-  return FatGetDirEntInfo (OFile->Volume, OFile->DirEnt, BufferSize, Buffer);\r
-}\r
+  @retval EFI_SUCCESS           - Get the volume info successfully.\r
+  @retval EFI_BUFFER_TOO_SMALL  - The buffer is too small.\r
 \r
+**/\r
 EFI_STATUS\r
 FatGetVolumeInfo (\r
   IN     FAT_VOLUME     *Volume,\r
   IN OUT UINTN          *BufferSize,\r
      OUT VOID           *Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Get the volume's info into Buffer.\r
-\r
-Arguments:\r
-\r
-  Volume                - FAT file system volume.\r
-  BufferSize            - Size of Buffer.\r
-  Buffer                - Buffer containing volume info.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - Get the volume info successfully.\r
-  EFI_BUFFER_TOO_SMALL  - The buffer is too small.\r
-\r
---*/\r
 {\r
   UINTN                 Size;\r
   UINTN                 NameSize;\r
@@ -141,30 +121,24 @@ Returns:
   return Status;\r
 }\r
 \r
+/**\r
+\r
+  Get the volume's label info into Buffer.\r
+\r
+  @param  Volume                - FAT file system volume.\r
+  @param  BufferSize            - Size of Buffer.\r
+  @param  Buffer                - Buffer containing volume's label info.\r
+\r
+  @retval EFI_SUCCESS           - Get the volume's label info successfully.\r
+  @retval EFI_BUFFER_TOO_SMALL  - The buffer is too small.\r
+\r
+**/\r
 EFI_STATUS\r
 FatGetVolumeLabelInfo (\r
   IN FAT_VOLUME       *Volume,\r
   IN OUT UINTN        *BufferSize,\r
   OUT VOID            *Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Get the volume's label info into Buffer.\r
-\r
-Arguments:\r
-\r
-  Volume                - FAT file system volume.\r
-  BufferSize            - Size of Buffer.\r
-  Buffer                - Buffer containing volume's label info.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - Get the volume's label info successfully.\r
-  EFI_BUFFER_TOO_SMALL  - The buffer is too small.\r
-\r
---*/\r
 {\r
   UINTN                             Size;\r
   UINTN                             NameSize;\r
@@ -187,32 +161,26 @@ Returns:
   return Status;\r
 }\r
 \r
+/**\r
+\r
+  Set the volume's info.\r
+\r
+  @param  Volume                - FAT file system volume.\r
+  @param  BufferSize            - Size of Buffer.\r
+  @param  Buffer                - Buffer containing the new volume info.\r
+\r
+  @retval EFI_SUCCESS           - Set the volume info successfully.\r
+  @retval EFI_BAD_BUFFER_SIZE   - The buffer size is error.\r
+  @retval EFI_WRITE_PROTECTED   - The volume is read only.\r
+  @return other                 - An error occurred when operation the disk.\r
+\r
+**/\r
 EFI_STATUS\r
 FatSetVolumeInfo (\r
   IN FAT_VOLUME       *Volume,\r
   IN UINTN            BufferSize,\r
   IN VOID             *Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Set the volume's info.\r
-\r
-Arguments:\r
-\r
-  Volume                - FAT file system volume.\r
-  BufferSize            - Size of Buffer.\r
-  Buffer                - Buffer containing the new volume info.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - Set the volume info successfully.\r
-  EFI_BAD_BUFFER_SIZE   - The buffer size is error.\r
-  EFI_WRITE_PROTECTED   - The volume is read only.\r
-  other                 - An error occurred when operation the disk.\r
-\r
---*/\r
 {\r
   EFI_FILE_SYSTEM_INFO  *Info;\r
 \r
@@ -225,32 +193,26 @@ Returns:
   return FatSetVolumeEntry (Volume, Info->VolumeLabel);\r
 }\r
 \r
+/**\r
+\r
+  Set the volume's label info.\r
+\r
+  @param  Volume                - FAT file system volume.\r
+  @param  BufferSize            - Size of Buffer.\r
+  @param  Buffer                - Buffer containing the new volume label info.\r
+\r
+  @retval EFI_SUCCESS           - Set the volume label info successfully.\r
+  @retval EFI_WRITE_PROTECTED   - The disk is write protected.\r
+  @retval EFI_BAD_BUFFER_SIZE   - The buffer size is error.\r
+  @return other                 - An error occurred when operation the disk.\r
+\r
+**/\r
 EFI_STATUS\r
 FatSetVolumeLabelInfo (\r
   IN FAT_VOLUME       *Volume,\r
   IN UINTN            BufferSize,\r
   IN VOID             *Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Set the volume's label info\r
-\r
-Arguments:\r
-\r
-  Volume                - FAT file system volume.\r
-  BufferSize            - Size of Buffer.\r
-  Buffer                - Buffer containing the new volume label info.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - Set the volume label info successfully.\r
-  EFI_WRITE_PROTECTED   - The disk is write protected.\r
-  EFI_BAD_BUFFER_SIZE   - The buffer size is error.\r
-  other                 - An error occurred when operation the disk.\r
-\r
---*/\r
 {\r
   EFI_FILE_SYSTEM_VOLUME_LABEL *Info;\r
 \r
@@ -263,6 +225,30 @@ Returns:
   return FatSetVolumeEntry (Volume, Info->VolumeLabel);\r
 }\r
 \r
+/**\r
+\r
+  Set the file info.\r
+\r
+  @param  Volume                - FAT file system volume.\r
+  @param  IFile                 - The instance of the open file.\r
+  @param  OFile                 - The open file.\r
+  @param  BufferSize            - Size of Buffer.\r
+  @param  Buffer                - Buffer containing the new file info.\r
+\r
+  @retval EFI_SUCCESS           - Set the file info successfully.\r
+  @retval EFI_ACCESS_DENIED     - It is the root directory\r
+                          or the directory attribute bit can not change\r
+                          or try to change a directory size\r
+                          or something else.\r
+  @retval EFI_UNSUPPORTED       - The new file size is larger than 4GB.\r
+  @retval EFI_WRITE_PROTECTED   - The disk is write protected.\r
+  @retval EFI_BAD_BUFFER_SIZE   - The buffer size is error.\r
+  @retval EFI_INVALID_PARAMETER - The time info or attributes info is error.\r
+  @retval EFI_OUT_OF_RESOURCES  - Can not allocate new memory.\r
+  @retval EFI_VOLUME_CORRUPTED  - The volume is corrupted.\r
+  @return other                 - An error occurred when operation the disk.\r
+\r
+**/\r
 EFI_STATUS\r
 FatSetFileInfo (\r
   IN FAT_VOLUME       *Volume,\r
@@ -271,36 +257,6 @@ FatSetFileInfo (
   IN UINTN            BufferSize,\r
   IN VOID             *Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Set the file info.\r
-\r
-Arguments:\r
-\r
-  Volume                - FAT file system volume.\r
-  IFile                 - The instance of the open file.\r
-  OFile                 - The open file.\r
-  BufferSize            - Size of Buffer.\r
-  Buffer                - Buffer containing the new file info.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - Set the file info successfully.\r
-  EFI_ACCESS_DENIED     - It is the root directory\r
-                          or the directory attribute bit can not change\r
-                          or try to change a directory size\r
-                          or something else.\r
-  EFI_UNSUPPORTED       - The new file size is larger than 4GB.\r
-  EFI_WRITE_PROTECTED   - The disk is write protected.\r
-  EFI_BAD_BUFFER_SIZE   - The buffer size is error.\r
-  EFI_INVALID_PARAMETER - The time info or attributes info is error.\r
-  EFI_OUT_OF_RESOURCES  - Can not allocate new memory.\r
-  EFI_VOLUME_CORRUPTED  - The volume is corrupted.\r
-  other                 - An error occurred when operation the disk.\r
-\r
---*/\r
 {\r
   EFI_STATUS    Status;\r
   EFI_FILE_INFO *NewInfo;\r
@@ -472,6 +428,20 @@ Returns:
   return FatOFileFlush (OFile);\r
 }\r
 \r
+/**\r
+\r
+  Set or Get the some types info of the file into Buffer.\r
+\r
+  @param  IsSet      - TRUE:The access is set, else is get\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
+  @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
 FatSetOrGetInfo (\r
   IN     BOOLEAN            IsSet,\r
@@ -480,26 +450,6 @@ FatSetOrGetInfo (
   IN OUT UINTN              *BufferSize,\r
   IN OUT VOID               *Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Set or Get the some types info of the file into Buffer\r
-\r
-Arguments:\r
-\r
-  IsSet      - TRUE:The access is set, else is get\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
-Returns:\r
-\r
-  EFI_SUCCESS       - Get the info successfully\r
-  EFI_DEVICE_ERROR  - Can not find the OFile for the file\r
-\r
---*/\r
 {\r
   FAT_IFILE   *IFile;\r
   FAT_OFILE   *OFile;\r
@@ -560,6 +510,19 @@ Returns:
   return Status;\r
 }\r
 \r
+/**\r
+\r
+  Get the some types info of the file into Buffer.\r
+\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
+  @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
@@ -568,29 +531,23 @@ 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
+  return FatSetOrGetInfo (FALSE, FHand, Type, BufferSize, Buffer);\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
-  return FatSetOrGetInfo (FALSE, FHand, Type, BufferSize, Buffer);\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
@@ -599,25 +556,6 @@ 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
-  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
-Returns:\r
-\r
-  EFI_SUCCESS           - Set the info successfully.\r
-  EFI_DEVICE_ERROR      - Can not find the OFile for the file.\r
-\r
---*/\r
 {\r
   return FatSetOrGetInfo (TRUE, FHand, Type, &BufferSize, Buffer);\r
 }\r