]> git.proxmox.com Git - mirror_edk2.git/commitdiff
FatPkg/EnhancedFatDxe: Make the comments align with EDKIIcoding style
authorDandan Bi <dandan.bi@intel.com>
Fri, 9 Dec 2016 02:07:49 +0000 (10:07 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Fri, 9 Dec 2016 03:02:09 +0000 (11:02 +0800)
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
21 files changed:
FatPkg/EnhancedFatDxe/ComponentName.c
FatPkg/EnhancedFatDxe/Data.c
FatPkg/EnhancedFatDxe/Debug.c
FatPkg/EnhancedFatDxe/Delete.c
FatPkg/EnhancedFatDxe/DirectoryCache.c
FatPkg/EnhancedFatDxe/DirectoryManage.c
FatPkg/EnhancedFatDxe/DiskCache.c
FatPkg/EnhancedFatDxe/Fat.c
FatPkg/EnhancedFatDxe/Fat.h
FatPkg/EnhancedFatDxe/FatFileSystem.h
FatPkg/EnhancedFatDxe/FileName.c
FatPkg/EnhancedFatDxe/FileSpace.c
FatPkg/EnhancedFatDxe/Flush.c
FatPkg/EnhancedFatDxe/Hash.c
FatPkg/EnhancedFatDxe/Info.c
FatPkg/EnhancedFatDxe/Init.c
FatPkg/EnhancedFatDxe/Misc.c
FatPkg/EnhancedFatDxe/Open.c
FatPkg/EnhancedFatDxe/OpenVolume.c
FatPkg/EnhancedFatDxe/ReadWrite.c
FatPkg/EnhancedFatDxe/UnicodeCollation.c

index af3f9e61f1a73c529d6d1f0d8b82bd84a02506d2..ce1c975b5f1b1f5551690bd56340954ead9bc98e 100644 (file)
@@ -1,4 +1,4 @@
-/*++\r
+/** @file\r
 \r
 Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials are licensed and made available\r
@@ -10,13 +10,7 @@ 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
-  ComponentName.c\r
-\r
-Abstract:\r
-\r
---*/\r
+**/\r
 \r
 #include "Fat.h"\r
 \r
index b20cc4592d3f52cf3c182cb85c24c96b2d8989c1..56a265e4f2b872498460eef6b4ad40cebc58ddc2 100644 (file)
@@ -1,4 +1,5 @@
-/*++\r
+/** @file\r
+  Global data in the FAT Filesystem 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
-  Data.c\r
-\r
-Abstract:\r
-\r
-  Global data in the FAT Filesystem driver\r
-\r
-Revision History\r
-\r
---*/\r
+**/\r
 \r
 #include "Fat.h"\r
 \r
index 7c0dc209340004df531c75a348e7bed74db86822..ad237863336db50e195ee346bb17a843c8217bb4 100644 (file)
@@ -1,4 +1,5 @@
-/*++\r
+/** @file\r
+  Debug functions for fat driver\r
 \r
 Copyright (c) 2005, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials are licensed and made available\r
@@ -9,40 +10,21 @@ 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
 \r
-Module Name:\r
-\r
-  debug.c\r
-\r
-Abstract:\r
-\r
-  Debug functions for fat driver\r
+#include "Fat.h"\r
 \r
-Revision History\r
+/**\r
 \r
---*/\r
+  Dump all the FAT Entry of the FAT table in the volume.\r
 \r
-#include "Fat.h"\r
+  @param  Volume - The volume whose FAT info will be dumped\r
 \r
+**/\r
 VOID\r
 FatDumpFatTable (\r
   IN FAT_VOLUME   *Volume\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Dump all the FAT Entry of the FAT table in the volume\r
-\r
-Arguments:\r
-\r
-  Volume - The volume whose FAT info will be dumped\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
 {\r
   UINTN   EntryValue;\r
   UINTN   MaxIndex;\r
index e5103a850c668424bae4f5eea97240f04bfea223..9837565a8ef8f11c8d211aeb72ff64c18d17dbb0 100644 (file)
@@ -1,4 +1,5 @@
-/*++\r
+/** @file\r
+  Function that deletes a file.\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
@@ -10,41 +11,25 @@ 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
 \r
-  delete.c\r
-\r
-Abstract:\r
+#include "Fat.h"\r
 \r
-  Function that deletes a file\r
+/**\r
 \r
-Revision History\r
+  Deletes the file & Closes the file handle.\r
 \r
---*/\r
+  @param  FHand                    - Handle to the file to delete.\r
 \r
-#include "Fat.h"\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
-  FHand                    - Handle to the file to delete.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS              - Delete the file successfully.\r
-  EFI_WARN_DELETE_FAILURE  - Fail to delete the file.\r
-\r
---*/\r
 {\r
   FAT_IFILE   *IFile;\r
   FAT_OFILE   *OFile;\r
index 568b29178bd101e7d97f34c4fedbc36f9e7a2207..30de86a996a1e13b72bd4a737b68925ef78b65d2 100644 (file)
@@ -1,4 +1,5 @@
-/*++\r
+/** @file\r
+  Functions for directory cache operation.\r
 \r
 Copyright (c) 2005, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials are licensed and made available\r
@@ -10,40 +11,22 @@ 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
 \r
-  DirectoryCache.c\r
-\r
-Abstract:\r
-\r
-  Functions for directory cache operation\r
+#include "Fat.h"\r
 \r
-Revision History\r
+/**\r
 \r
---*/\r
+  Free the directory structure and release the memory.\r
 \r
-#include "Fat.h"\r
+  @param  ODir                  - The directory to be freed.\r
 \r
+**/\r
 STATIC\r
 VOID\r
 FatFreeODir (\r
   IN FAT_ODIR    *ODir\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Free the directory structure and release the memory.\r
-\r
-Arguments:\r
-\r
-  ODir                  - The directory to be freed.\r
-\r
-Returns:\r
-\r
-  None.\r
-\r
---*/\r
 {\r
   FAT_DIRENT  *DirEnt;\r
 \r
@@ -63,26 +46,18 @@ Returns:
   FreePool (ODir);\r
 }\r
 \r
+/**\r
+\r
+  Allocate the directory structure.\r
+\r
+  @param  OFile                   - The corresponding OFile.\r
+\r
+**/\r
 STATIC\r
 FAT_ODIR *\r
 FatAllocateODir (\r
   IN FAT_OFILE   *OFile\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Allocate the directory structure.\r
-\r
-Arguments:\r
-\r
-  OFile                   - The corresponding OFile.\r
-\r
-Returns:\r
-\r
-  None.\r
-\r
---*/\r
 {\r
   FAT_ODIR  *ODir;\r
 \r
@@ -99,26 +74,18 @@ Returns:
   return ODir;\r
 }\r
 \r
-VOID\r
-FatDiscardODir (\r
-  IN FAT_OFILE    *OFile\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Discard the directory structure when an OFile will be freed.\r
   Volume will cache this directory if the OFile does not represent a deleted file.\r
 \r
-Arguments:\r
+  @param  OFile                 - The OFile whose directory structure is to be discarded.\r
 \r
-  OFile                 - The OFile whose directory structure is to be discarded.\r
-\r
-Returns:\r
-\r
-  None.\r
-\r
---*/\r
+**/\r
+VOID\r
+FatDiscardODir (\r
+  IN FAT_OFILE    *OFile\r
+  )\r
 {\r
   FAT_ODIR    *ODir;\r
   FAT_VOLUME  *Volume;\r
@@ -154,27 +121,20 @@ Returns:
   }\r
 }\r
 \r
-VOID\r
-FatRequestODir (\r
-  IN FAT_OFILE    *OFile\r
-  )\r
-/*++\r
+/**\r
 \r
-Routine Description:\r
 \r
   Request the directory structure when an OFile is newly generated.\r
   If the directory structure is cached by volume, then just return this directory;\r
   Otherwise, allocate a new one for OFile.\r
 \r
-Arguments:\r
-\r
-  OFile                 - The OFile which requests directory structure.\r
+  @param  OFile                 - The OFile which requests directory structure.\r
 \r
-Returns:\r
-\r
-  None.\r
-\r
---*/\r
+**/\r
+VOID\r
+FatRequestODir (\r
+  IN FAT_OFILE    *OFile\r
+  )\r
 {\r
   UINTN           DirCacheTag;\r
   FAT_VOLUME      *Volume;\r
@@ -208,25 +168,17 @@ Returns:
   OFile->ODir = ODir;\r
 }\r
 \r
-VOID\r
-FatCleanupODirCache (\r
-  IN FAT_VOLUME         *Volume\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Clean up all the cached directory structures when the volume is going to be abandoned.\r
 \r
-Arguments:\r
+  @param  Volume                - FAT file system volume.\r
 \r
-  Volume                - FAT file system volume.\r
-\r
-Returns:\r
-\r
-  None.\r
-\r
---*/\r
+**/\r
+VOID\r
+FatCleanupODirCache (\r
+  IN FAT_VOLUME         *Volume\r
+  )\r
 {\r
   FAT_ODIR  *ODir;\r
   while (Volume->DirCacheCount > 0) {\r
index 149119dc2dba194ba60d8263fc57371838dfb57b..fe6fcc9d8874256805bd015a858dfc9472a9aa54 100644 (file)
@@ -1,4 +1,5 @@
-/*++\r
+/** @file\r
+  Functions for performing directory entry io.\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
@@ -9,21 +10,23 @@ 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
 \r
-Module Name:\r
-\r
-  DirectoryManage.c\r
-\r
-Abstract:\r
+#include "Fat.h"\r
 \r
-  Functions for performing directory entry io\r
+/**\r
 \r
-Revision History\r
+  Get a directory entry from disk for the Ofile.\r
 \r
---*/\r
+  @param  Parent                - The parent of the OFile which need to update.\r
+  @param  IoMode                - Indicate whether to read directory entry or write directroy entry.\r
+  @param  EntryPos              - The position of the directory entry to be accessed.\r
+  @param  Entry                 - The directory entry read or written.\r
 \r
-#include "Fat.h"\r
+  @retval EFI_SUCCESS           - Access the directory entry sucessfully.\r
+  @return other                 - An error occurred when reading the directory entry.\r
 \r
+**/\r
 STATIC\r
 EFI_STATUS\r
 FatAccessEntry (\r
@@ -32,25 +35,6 @@ FatAccessEntry (
   IN     UINTN                EntryPos,\r
   IN OUT VOID                 *Entry\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Get a directory entry from disk for the Ofile.\r
-\r
-Arguments:\r
-\r
-  Parent                - The parent of the OFile which need to update.\r
-  IoMode                - Indicate whether to read directory entry or write directroy entry.\r
-  EntryPos              - The position of the directory entry to be accessed.\r
-  Entry                 - The directory entry read or written.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - Access the directory entry sucessfully.\r
-  other                 - An error occurred when reading the directory entry.\r
-\r
---*/\r
 {\r
   UINTN Position;\r
   UINTN BufferSize;\r
@@ -70,28 +54,22 @@ Returns:
   return FatAccessOFile (Parent, IoMode, Position, &BufferSize, Entry, NULL);\r
 }\r
 \r
-EFI_STATUS\r
-FatStoreDirEnt (\r
-  IN FAT_OFILE            *OFile,\r
-  IN FAT_DIRENT           *DirEnt\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Save the directory entry to disk.\r
 \r
-Arguments:\r
-\r
-  OFile                 - The parent OFile which needs to update.\r
-  DirEnt                - The directory entry to be saved.\r
-\r
-Returns:\r
+  @param  OFile                 - The parent OFile which needs to update.\r
+  @param  DirEnt                - The directory entry to be saved.\r
 \r
-  EFI_SUCCESS           - Store the directory entry successfully.\r
-  other                 - An error occurred when writing the directory entry.\r
+  @retval EFI_SUCCESS           - Store the directory entry successfully.\r
+  @return other                 - An error occurred when writing the directory entry.\r
 \r
---*/\r
+**/\r
+EFI_STATUS\r
+FatStoreDirEnt (\r
+  IN FAT_OFILE            *OFile,\r
+  IN FAT_DIRENT           *DirEnt\r
+  )\r
 {\r
   EFI_STATUS        Status;\r
   FAT_DIRECTORY_LFN LfnEntry;\r
@@ -157,26 +135,20 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
-BOOLEAN\r
-FatIsDotDirEnt (\r
-  IN FAT_DIRENT  *DirEnt\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Determine whether the directory entry is "." or ".." entry.\r
 \r
-Arguments:\r
+  @param  DirEnt               - The corresponding directory entry.\r
 \r
-  DirEnt               - The corresponding directory entry.\r
+  @retval TRUE                 - The directory entry is "." or ".." directory entry\r
+  @retval FALSE                - The directory entry is not "." or ".." directory entry\r
 \r
-Returns:\r
-\r
-  TRUE                 - The directory entry is "." or ".." directory entry\r
-  FALSE                - The directory entry is not "." or ".." directory entry\r
-\r
---*/\r
+**/\r
+BOOLEAN\r
+FatIsDotDirEnt (\r
+  IN FAT_DIRENT  *DirEnt\r
+  )\r
 {\r
   CHAR16  *FileString;\r
   FileString = DirEnt->FileString;\r
@@ -187,26 +159,18 @@ Returns:
   return FALSE;\r
 }\r
 \r
+/**\r
+\r
+  Set the OFile's cluster info in its directory entry.\r
+\r
+  @param  OFile                 - The corresponding OFile.\r
+\r
+**/\r
 STATIC\r
 VOID\r
 FatSetDirEntCluster (\r
   IN FAT_OFILE    *OFile\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Set the OFile's cluster info in its directory entry.\r
-\r
-Arguments:\r
-\r
-  OFile                 - The corresponding OFile.\r
-\r
-Returns:\r
-\r
-  None.\r
-\r
---*/\r
 {\r
   UINTN       Cluster;\r
   FAT_DIRENT  *DirEnt;\r
@@ -217,52 +181,36 @@ Returns:
   DirEnt->Entry.FileCluster     = (UINT16) Cluster;\r
 }\r
 \r
-VOID\r
-FatUpdateDirEntClusterSizeInfo (\r
-  IN FAT_OFILE    *OFile\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Set the OFile's cluster and size info in its directory entry.\r
 \r
-Arguments:\r
-\r
-  OFile                 - The corresponding OFile.\r
-\r
-Returns:\r
-\r
-  None.\r
+  @param  OFile                 - The corresponding OFile.\r
 \r
---*/\r
+**/\r
+VOID\r
+FatUpdateDirEntClusterSizeInfo (\r
+  IN FAT_OFILE    *OFile\r
+  )\r
 {\r
   ASSERT (OFile->ODir == NULL);\r
   OFile->DirEnt->Entry.FileSize = (UINT32) OFile->FileSize;\r
   FatSetDirEntCluster (OFile);\r
 }\r
 \r
+/**\r
+\r
+  Copy all the information of DirEnt2 to DirEnt1 except for 8.3 name.\r
+\r
+  @param  DirEnt1               - The destination directory entry.\r
+  @param  DirEnt2               - The source directory entry.\r
+\r
+**/\r
 VOID\r
 FatCloneDirEnt (\r
   IN  FAT_DIRENT          *DirEnt1,\r
   IN  FAT_DIRENT          *DirEnt2\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Copy all the information of DirEnt2 to DirEnt1 except for 8.3 name.\r
-\r
-Arguments:\r
-\r
-  DirEnt1               - The destination directory entry.\r
-  DirEnt2               - The source directory entry.\r
-\r
-Returns:\r
-\r
-  None.\r
-\r
---*/\r
 {\r
   UINT8 *Entry1;\r
   UINT8 *Entry2;\r
@@ -275,28 +223,20 @@ Returns:
     );\r
 }\r
 \r
+/**\r
+\r
+  Get the LFN for the directory entry.\r
+\r
+  @param  Parent                - The parent directory.\r
+  @param  DirEnt                - The directory entry to get LFN.\r
+\r
+**/\r
 STATIC\r
 VOID\r
 FatLoadLongNameEntry (\r
   IN FAT_OFILE           *Parent,\r
   IN FAT_DIRENT          *DirEnt\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Get the LFN for the directory entry.\r
-\r
-Arguments:\r
-\r
-  Parent                - The parent directory.\r
-  DirEnt                - The directory entry to get LFN.\r
-\r
-Returns:\r
-\r
-  None.\r
-\r
---*/\r
 {\r
   CHAR16            LfnBuffer[MAX_LFN_ENTRIES * LFN_CHAR_TOTAL + 1];\r
   CHAR16            *LfnBufferPointer;\r
@@ -367,28 +307,20 @@ Returns:
   DirEnt->FileString = AllocateCopyPool (StrSize (LfnBuffer), LfnBuffer);\r
 }\r
 \r
+/**\r
+\r
+  Add this directory entry node to the list of directory entries and hash table.\r
+\r
+  @param  ODir                  - The parent OFile which needs to be updated.\r
+  @param  DirEnt                - The directory entry to be added.\r
+\r
+**/\r
 STATIC\r
 VOID\r
 FatAddDirEnt (\r
   IN FAT_ODIR             *ODir,\r
   IN FAT_DIRENT           *DirEnt\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Add this directory entry node to the list of directory entries and hash table.\r
-\r
-Arguments:\r
-\r
-  ODir                  - The parent OFile which needs to be updated.\r
-  DirEnt                - The directory entry to be added.\r
-\r
-Returns:\r
-\r
-  None.\r
-\r
---*/\r
 {\r
   if (DirEnt->Link.BackLink == NULL) {\r
     DirEnt->Link.BackLink = &ODir->ChildList;\r
@@ -397,30 +329,24 @@ Returns:
   FatInsertToHashTable (ODir, DirEnt);\r
 }\r
 \r
+/**\r
+\r
+  Load from disk the next directory entry at current end of directory position.\r
+\r
+  @param  OFile                 - The parent OFile.\r
+  @param  PtrDirEnt             - The directory entry that is loaded.\r
+\r
+  @retval EFI_SUCCESS           - Load the directory entry successfully.\r
+  @retval EFI_OUT_OF_RESOURCES  - Out of resource.\r
+  @return other                 - An error occurred when reading the directory entries.\r
+\r
+**/\r
 STATIC\r
 EFI_STATUS\r
 FatLoadNextDirEnt (\r
   IN  FAT_OFILE           *OFile,\r
   OUT FAT_DIRENT          **PtrDirEnt\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Load from disk the next directory entry at current end of directory position\r
-\r
-Arguments:\r
-\r
-  OFile                 - The parent OFile.\r
-  PtrDirEnt             - The directory entry that is loaded.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - Load the directory entry successfully.\r
-  EFI_OUT_OF_RESOURCES  - Out of resource.\r
-  other                 - An error occurred when reading the directory entries.\r
-\r
---*/\r
 {\r
   EFI_STATUS          Status;\r
   FAT_DIRENT          *DirEnt;\r
@@ -505,6 +431,19 @@ Done:
   return Status;\r
 }\r
 \r
+/**\r
+\r
+  Get the directory entry's info into Buffer.\r
+\r
+  @param  Volume                - FAT file system volume.\r
+  @param  DirEnt                - The corresponding directory entry.\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
 FatGetDirEntInfo (\r
   IN     FAT_VOLUME         *Volume,\r
@@ -512,25 +451,6 @@ FatGetDirEntInfo (
   IN OUT UINTN              *BufferSize,\r
      OUT VOID               *Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Get the directory entry's info into Buffer.\r
-\r
-Arguments:\r
-\r
-  Volume                - FAT file system volume.\r
-  DirEnt                - The corresponding directory entry.\r
-  BufferSize            - Size of Buffer.\r
-  Buffer                - Buffer containing file info.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - Get the file info successfully.\r
-  EFI_BUFFER_TOO_SMALL  - The buffer is too small.\r
-\r
---*/\r
 {\r
   UINTN               Size;\r
   UINTN               NameSize;\r
@@ -575,6 +495,18 @@ Returns:
   return Status;\r
 }\r
 \r
+/**\r
+\r
+  Search the directory for the directory entry whose filename is FileNameString.\r
+\r
+  @param  OFile                 - The parent OFile whose directory is to be searched.\r
+  @param  FileNameString        - The filename to be searched.\r
+  @param  PtrDirEnt             - pointer to the directory entry if found.\r
+\r
+  @retval EFI_SUCCESS           - Find the directory entry or not found.\r
+  @return other                 - An error occurred when reading the directory entries.\r
+\r
+**/\r
 STATIC\r
 EFI_STATUS\r
 FatSearchODir (\r
@@ -582,24 +514,6 @@ FatSearchODir (
   IN  CHAR16         *FileNameString,\r
   OUT FAT_DIRENT     **PtrDirEnt\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Search the directory for the directory entry whose filename is FileNameString.\r
-\r
-Arguments:\r
-\r
-  OFile                 - The parent OFile whose directory is to be searched.\r
-  FileNameString        - The filename to be searched.\r
-  PtrDirEnt             - pointer to the directory entry if found.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - Find the directory entry or not found.\r
-  other                 - An error occurred when reading the directory entries.\r
-\r
---*/\r
 {\r
   BOOLEAN     PossibleShortName;\r
   CHAR8       File8Dot3Name[FAT_NAME_LEN];\r
@@ -647,25 +561,17 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
-VOID\r
-FatResetODirCursor (\r
-  IN FAT_OFILE    *OFile\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Set the OFile's current directory cursor to the list head.\r
 \r
-Arguments:\r
+  @param OFile                 - The directory OFile whose directory cursor is reset.\r
 \r
-  OFile                 - The directory OFile whose directory cursor is reset.\r
-\r
-Returns:\r
-\r
-  None.\r
-\r
---*/\r
+**/\r
+VOID\r
+FatResetODirCursor (\r
+  IN FAT_OFILE    *OFile\r
+  )\r
 {\r
   FAT_ODIR  *ODir;\r
 \r
@@ -675,28 +581,22 @@ Returns:
   ODir->CurrentPos    = 0;\r
 }\r
 \r
-EFI_STATUS\r
-FatGetNextDirEnt (\r
-  IN  FAT_OFILE     *OFile,\r
-  OUT FAT_DIRENT    **PtrDirEnt\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Set the directory's cursor to the next and get the next directory entry.\r
 \r
-Arguments:\r
-\r
-  OFile                 - The parent OFile.\r
-  PtrDirEnt             - The next directory entry.\r
-\r
-Returns:\r
+  @param  OFile                 - The parent OFile.\r
+  @param PtrDirEnt             - The next directory entry.\r
 \r
-  EFI_SUCCESS           - We get the next directory entry successfully.\r
-  other                 - An error occurred when get next directory entry.\r
+  @retval EFI_SUCCESS           - We get the next directory entry successfully.\r
+  @return other                 - An error occurred when get next directory entry.\r
 \r
---*/\r
+**/\r
+EFI_STATUS\r
+FatGetNextDirEnt (\r
+  IN  FAT_OFILE     *OFile,\r
+  OUT FAT_DIRENT    **PtrDirEnt\r
+  )\r
 {\r
   EFI_STATUS  Status;\r
   FAT_DIRENT  *DirEnt;\r
@@ -735,28 +635,20 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+\r
+  Set the directory entry count according to the filename.\r
+\r
+  @param  OFile                 - The corresponding OFile.\r
+  @param  DirEnt                - The directory entry to be set.\r
+\r
+**/\r
 STATIC\r
 VOID\r
 FatSetEntryCount (\r
   IN FAT_OFILE    *OFile,\r
   IN FAT_DIRENT   *DirEnt\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Set the directory entry count according to the filename.\r
-\r
-Arguments:\r
-\r
-  OFile                 - The corresponding OFile.\r
-  DirEnt                - The directory entry to be set.\r
-\r
-Returns:\r
-\r
-  None.\r
-\r
---*/\r
 {\r
   CHAR16  *FileString;\r
   CHAR8   *File8Dot3Name;\r
@@ -800,54 +692,42 @@ Returns:
   }\r
 }\r
 \r
+/**\r
+\r
+  Append a zero cluster to the current OFile.\r
+\r
+  @param  OFile        - The directory OFile which needs to be updated.\r
+\r
+  @retval EFI_SUCCESS  - Append a zero cluster to the OFile successfully.\r
+  @return other        - An error occurred when appending the zero cluster.\r
+\r
+**/\r
 STATIC\r
 EFI_STATUS\r
 FatExpandODir (\r
   IN FAT_OFILE  *OFile\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Append a zero cluster to the current OFile.\r
+{\r
+  return FatExpandOFile (OFile, OFile->FileSize + OFile->Volume->ClusterSize);\r
+}\r
 \r
-Arguments:\r
+/**\r
 \r
-  OFile        - The directory OFile which needs to be updated.\r
+  Search the Root OFile for the possible volume label.\r
 \r
-Returns:\r
+  @param  Root                  - The Root OFile.\r
+  @param  DirEnt                - The returned directory entry of volume label.\r
 \r
-  EFI_SUCCESS  - Append a zero cluster to the OFile successfully.\r
-  other        - An error occurred when appending the zero cluster.\r
-\r
---*/\r
-{\r
-  return FatExpandOFile (OFile, OFile->FileSize + OFile->Volume->ClusterSize);\r
-}\r
+  @retval EFI_SUCCESS           - The search process is completed successfully.\r
+  @return other                 - An error occurred when searching volume label.\r
 \r
+**/\r
 STATIC\r
 EFI_STATUS\r
 FatSeekVolumeId (\r
   IN  FAT_OFILE            *Root,\r
   OUT FAT_DIRENT           *DirEnt\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Search the Root OFile for the possible volume label.\r
-\r
-Arguments:\r
-\r
-  Root                  - The Root OFile.\r
-  DirEnt                - The returned directory entry of volume label.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - The search process is completed successfully.\r
-  other                 - An error occurred when searching volume label.\r
-\r
---*/\r
 {\r
   EFI_STATUS          Status;\r
   UINTN               EntryPos;\r
@@ -874,33 +754,27 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
-STATIC\r
-EFI_STATUS\r
-FatFirstFitInsertDirEnt (\r
-  IN FAT_OFILE    *OFile,\r
-  IN FAT_DIRENT   *DirEnt\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Use First Fit Algorithm to insert directory entry.\r
   Only this function will erase "E5" entries in a directory.\r
   In view of safest recovery, this function will only be triggered\r
   when maximum directory entry number has reached.\r
 \r
-Arguments:\r
-\r
-  OFile                 - The corresponding OFile.\r
-  DirEnt                - The directory entry to be inserted.\r
+  @param  OFile                 - The corresponding OFile.\r
+  @param  DirEnt                - The directory entry to be inserted.\r
 \r
-Returns:\r
+  @retval EFI_SUCCESS           - The directory entry has been successfully inserted.\r
+  @retval EFI_VOLUME_FULL       - The directory can not hold more directory entries.\r
+  @return Others                - Some error occurred when inserting new directory entries.\r
 \r
-  EFI_SUCCESS           - The directory entry has been successfully inserted.\r
-  EFI_VOLUME_FULL       - The directory can not hold more directory entries.\r
-  Others                - Some error occurred when inserting new directory entries.\r
-\r
---*/\r
+**/\r
+STATIC\r
+EFI_STATUS\r
+FatFirstFitInsertDirEnt (\r
+  IN FAT_OFILE    *OFile,\r
+  IN FAT_DIRENT   *DirEnt\r
+  )\r
 {\r
   EFI_STATUS      Status;\r
   FAT_ODIR        *ODir;\r
@@ -956,30 +830,24 @@ Done:
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+\r
+  Find the new directory entry position for the directory entry.\r
+\r
+  @param  OFile                 - The corresponding OFile.\r
+  @param  DirEnt                - The directory entry whose new position is to be set.\r
+\r
+  @retval EFI_SUCCESS           - The new directory entry position is successfully found.\r
+  @retval EFI_VOLUME_FULL       - The directory has reach its maximum capacity.\r
+  @return other                 - An error occurred when reading the directory entry.\r
+\r
+**/\r
 STATIC\r
 EFI_STATUS\r
 FatNewEntryPos (\r
   IN FAT_OFILE    *OFile,\r
   IN FAT_DIRENT   *DirEnt\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Find the new directory entry position for the directory entry.\r
-\r
-Arguments:\r
-\r
-  OFile                 - The corresponding OFile.\r
-  DirEnt                - The directory entry whose new position is to be set.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - The new directory entry position is successfully found.\r
-  EFI_VOLUME_FULL       - The directory has reach its maximum capacity.\r
-  other                 - An error occurred when reading the directory entry.\r
-\r
---*/\r
 {\r
   EFI_STATUS  Status;\r
   FAT_ODIR    *ODir;\r
@@ -1027,28 +895,22 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
-EFI_STATUS\r
-FatGetVolumeEntry (\r
-  IN FAT_VOLUME           *Volume,\r
-  IN CHAR16               *Name\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Get the directory entry for the volume.\r
 \r
-Arguments:\r
-\r
-  Volume                - FAT file system volume.\r
-  Name                  - The file name of the volume.\r
-\r
-Returns:\r
+  @param  Volume                - FAT file system volume.\r
+  @param  Name                  - The file name of the volume.\r
 \r
-  EFI_SUCCESS           - Update the volume with the directory entry sucessfully.\r
-  others                - An error occurred when getting volume label.\r
+  @retval EFI_SUCCESS           - Update the volume with the directory entry sucessfully.\r
+  @return others                - An error occurred when getting volume label.\r
 \r
---*/\r
+**/\r
+EFI_STATUS\r
+FatGetVolumeEntry (\r
+  IN FAT_VOLUME           *Volume,\r
+  IN CHAR16               *Name\r
+  )\r
 {\r
   EFI_STATUS  Status;\r
   FAT_DIRENT  LabelDirEnt;\r
@@ -1064,29 +926,23 @@ Returns:
   return Status;\r
 }\r
 \r
-EFI_STATUS\r
-FatSetVolumeEntry (\r
-  IN FAT_VOLUME           *Volume,\r
-  IN CHAR16               *Name\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Set the relevant directory entry into disk for the volume.\r
 \r
-Arguments:\r
-\r
-  Volume              - FAT file system volume.\r
-  Name                - The new file name of the volume.\r
-\r
-Returns:\r
+  @param  Volume              - FAT file system volume.\r
+  @param  Name                - The new file name of the volume.\r
 \r
-  EFI_SUCCESS         - Update the Volume sucessfully.\r
-  EFI_UNSUPPORTED     - The input label is not a valid volume label.\r
-  other               - An error occurred when setting volume label.\r
+  @retval EFI_SUCCESS         - Update the Volume sucessfully.\r
+  @retval EFI_UNSUPPORTED     - The input label is not a valid volume label.\r
+  @return other               - An error occurred when setting volume label.\r
 \r
---*/\r
+**/\r
+EFI_STATUS\r
+FatSetVolumeEntry (\r
+  IN FAT_VOLUME           *Volume,\r
+  IN CHAR16               *Name\r
+  )\r
 {\r
   EFI_STATUS  Status;\r
   FAT_DIRENT  LabelDirEnt;\r
@@ -1121,26 +977,20 @@ Returns:
   return FatStoreDirEnt (Root, &LabelDirEnt);\r
 }\r
 \r
-EFI_STATUS\r
-FatCreateDotDirEnts (\r
-  IN FAT_OFILE          *OFile\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Create "." and ".." directory entries in the newly-created parent OFile.\r
 \r
-Arguments:\r
-\r
-  OFile                 - The parent OFile.\r
+  @param  OFile                 - The parent OFile.\r
 \r
-Returns:\r
+  @retval EFI_SUCCESS           - The dot directory entries are successfully created.\r
+  @return other                 - An error occurred when creating the directory entry.\r
 \r
-  EFI_SUCCESS           - The dot directory entries are successfully created.\r
-  other                 - An error occurred when creating the directory entry.\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+FatCreateDotDirEnts (\r
+  IN FAT_OFILE          *OFile\r
+  )\r
 {\r
   EFI_STATUS  Status;\r
   FAT_DIRENT  *DirEnt;\r
@@ -1165,6 +1015,20 @@ Returns:
   return Status;\r
 }\r
 \r
+/**\r
+\r
+  Create a directory entry in the parent OFile.\r
+\r
+  @param  OFile                 - The parent OFile.\r
+  @param  FileName              - The filename of the newly-created directory entry.\r
+  @param  Attributes            - The attribute of the newly-created directory entry.\r
+  @param  PtrDirEnt             - The pointer to the newly-created directory entry.\r
+\r
+  @retval EFI_SUCCESS           - The directory entry is successfully created.\r
+  @retval EFI_OUT_OF_RESOURCES  - Not enough memory to create the directory entry.\r
+  @return other                 - An error occurred when creating the directory entry.\r
+\r
+**/\r
 EFI_STATUS\r
 FatCreateDirEnt (\r
   IN  FAT_OFILE         *OFile,\r
@@ -1172,26 +1036,6 @@ FatCreateDirEnt (
   IN  UINT8             Attributes,\r
   OUT FAT_DIRENT        **PtrDirEnt\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Create a directory entry in the parent OFile.\r
-\r
-Arguments:\r
-\r
-  OFile                 - The parent OFile.\r
-  FileName              - The filename of the newly-created directory entry.\r
-  Attributes            - The attribute of the newly-created directory entry.\r
-  PtrDirEnt             - The pointer to the newly-created directory entry.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - The directory entry is successfully created.\r
-  EFI_OUT_OF_RESOURCES  - Not enough memory to create the directory entry.\r
-  other                 - An error occurred when creating the directory entry.\r
-\r
---*/\r
 {\r
   FAT_DIRENT  *DirEnt;\r
   FAT_ODIR    *ODir;\r
@@ -1234,28 +1078,22 @@ Done:
   return Status;\r
 }\r
 \r
-EFI_STATUS\r
-FatRemoveDirEnt (\r
-  IN FAT_OFILE    *OFile,\r
-  IN FAT_DIRENT   *DirEnt\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Remove this directory entry node from the list of directory entries and hash table.\r
 \r
-Arguments:\r
-\r
-  OFile                - The parent OFile.\r
-  DirEnt               - The directory entry to be removed.\r
+  @param  OFile                - The parent OFile.\r
+  @param  DirEnt               - The directory entry to be removed.\r
 \r
-Returns:\r
+  @retval EFI_SUCCESS          - The directory entry is successfully removed.\r
+  @return other                - An error occurred when removing the directory entry.\r
 \r
-  EFI_SUCCESS          - The directory entry is successfully removed.\r
-  other                - An error occurred when removing the directory entry.\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+FatRemoveDirEnt (\r
+  IN FAT_OFILE    *OFile,\r
+  IN FAT_DIRENT   *DirEnt\r
+  )\r
 {\r
   FAT_ODIR  *ODir;\r
 \r
@@ -1279,29 +1117,23 @@ Returns:
   return FatStoreDirEnt (OFile, DirEnt);\r
 }\r
 \r
-EFI_STATUS\r
-FatOpenDirEnt (\r
-  IN FAT_OFILE         *Parent,\r
-  IN FAT_DIRENT        *DirEnt\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Open the directory entry to get the OFile.\r
 \r
-Arguments:\r
+  @param  Parent                - The parent OFile.\r
+  @param  DirEnt                - The directory entry to be opened.\r
 \r
-  OFile                 - The parent OFile.\r
-  DirEnt                - The directory entry to be opened.\r
+  @retval EFI_SUCCESS           - The directory entry is successfully opened.\r
+  @retval EFI_OUT_OF_RESOURCES  - not enough memory to allocate a new OFile.\r
+  @return other                 - An error occurred when opening the directory entry.\r
 \r
-Returns:\r
-\r
-  EFI_SUCCESS           - The directory entry is successfully opened.\r
-  EFI_OUT_OF_RESOURCES  - not enough memory to allocate a new OFile.\r
-  other                 - An error occurred when opening the directory entry.\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+FatOpenDirEnt (\r
+  IN FAT_OFILE         *Parent,\r
+  IN FAT_DIRENT        *DirEnt\r
+  )\r
 {\r
   FAT_OFILE   *OFile;\r
   FAT_VOLUME  *Volume;\r
@@ -1364,26 +1196,17 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
-VOID\r
-FatCloseDirEnt (\r
-  IN FAT_DIRENT        *DirEnt\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Close the directory entry and free the OFile.\r
 \r
-Arguments:\r
-\r
-  DirEnt               - The directory entry to be closed.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS          - The directory entry is successfully opened.\r
-  Other                - An error occurred when opening the directory entry.\r
+  @param  DirEnt               - The directory entry to be closed.\r
 \r
---*/\r
+**/\r
+VOID\r
+FatCloseDirEnt (\r
+  IN FAT_DIRENT        *DirEnt\r
+  )\r
 {\r
   FAT_OFILE   *OFile;\r
   FAT_VOLUME  *Volume;\r
@@ -1412,38 +1235,33 @@ Returns:
   }\r
 }\r
 \r
-EFI_STATUS\r
-FatLocateOFile (\r
-  IN OUT FAT_OFILE        **PtrOFile,\r
-  IN     CHAR16           *FileName,\r
-  IN     UINT8            Attributes,\r
-     OUT CHAR16           *NewFileName\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Traverse filename and open all OFiles that can be opened.\r
   Update filename pointer to the component that can't be opened.\r
   If more than one name component remains, returns an error;\r
   otherwise, return the remaining name component so that the caller might choose to create it.\r
 \r
-Arguments:\r
-  PtrOFile              - As input, the reference OFile; as output, the located OFile.\r
-  FileName              - The file name relevant to the OFile.\r
-  Attributes            - The attribute of the destination OFile.\r
-  NewFileName           - The remaining file name.\r
-\r
-Returns:\r
+  @param  PtrOFile              - As input, the reference OFile; as output, the located OFile.\r
+  @param  FileName              - The file name relevant to the OFile.\r
+  @param  Attributes            - The attribute of the destination OFile.\r
+  @param  NewFileName           - The remaining file name.\r
 \r
-  EFI_NOT_FOUND         - The file name can't be opened and there is more than one\r
+  @retval EFI_NOT_FOUND         - The file name can't be opened and there is more than one\r
                           components within the name left (this means the name can\r
                           not be created either).\r
-  EFI_INVALID_PARAMETER - The parameter is not valid.\r
-  EFI_SUCCESS           - Open the file successfully.\r
-  other                 - An error occured when locating the OFile.\r
+  @retval EFI_INVALID_PARAMETER - The parameter is not valid.\r
+  @retval EFI_SUCCESS           - Open the file successfully.\r
+  @return other                 - An error occured when locating the OFile.\r
 \r
---*/\r
+**/\r
+EFI_STATUS\r
+FatLocateOFile (\r
+  IN OUT FAT_OFILE        **PtrOFile,\r
+  IN     CHAR16           *FileName,\r
+  IN     UINT8            Attributes,\r
+     OUT CHAR16           *NewFileName\r
+  )\r
 {\r
   EFI_STATUS  Status;\r
   FAT_VOLUME  *Volume;\r
index 7f1fcf48cb720e7bcd3736ce202a5ba54e379571..63f9c007d6cc06defdbb074cdb607c3b446e59c7 100644 (file)
@@ -1,4 +1,5 @@
-/*++\r
+/** @file\r
+  Cache implementation 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,21 +10,29 @@ 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
 \r
-Module Name:\r
-\r
-  DiskCache.c\r
+#include "Fat.h"\r
 \r
-Abstract:\r
+/**\r
 \r
-  Cache implementation for EFI FAT File system driver\r
+  This function is used by the Data Cache.\r
 \r
-Revision History\r
+  When this function is called by write command, all entries in this range\r
+  are older than the contents in disk, so they are invalid; just mark them invalid.\r
 \r
---*/\r
+  When this function is called by read command, if any entry in this range\r
+  is dirty, it means that the relative info directly readed from media is older than\r
+  than the info in the cache; So need to update the relative info in the Buffer.\r
 \r
-#include "Fat.h"\r
+  @param  Volume                - FAT file system volume.\r
+  @param  IoMode                - This function is called by read command or write command\r
+  @param  StartPageNo           - First PageNo to be checked in the cache.\r
+  @param  EndPageNo             - Last PageNo to be checked in the cache.\r
+  @param  Buffer                - The user buffer need to update. Only when doing the read command\r
+                          and there is dirty cache in the cache range, this parameter will be used.\r
 \r
+**/\r
 STATIC\r
 VOID\r
 FatFlushDataCacheRange (\r
@@ -33,33 +42,6 @@ FatFlushDataCacheRange (
   IN  UINTN              EndPageNo,\r
   OUT UINT8              *Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  This function is used by the Data Cache.\r
-\r
-  When this function is called by write command, all entries in this range\r
-  are older than the contents in disk, so they are invalid; just mark them invalid.\r
-\r
-  When this function is called by read command, if any entry in this range\r
-  is dirty, it means that the relative info directly readed from media is older than\r
-  than the info in the cache; So need to update the relative info in the Buffer.\r
-\r
-Arguments:\r
-\r
-  Volume                - FAT file system volume.\r
-  IoMode                - This function is called by read command or write command\r
-  StartPageNo           - First PageNo to be checked in the cache.\r
-  EndPageNo             - Last PageNo to be checked in the cache.\r
-  Buffer                - The user buffer need to update. Only when doing the read command\r
-                          and there is dirty cache in the cache range, this parameter will be used.\r
-\r
-Returns:\r
-\r
-  None.\r
-\r
---*/\r
 {\r
   UINTN       PageNo;\r
   UINTN       GroupNo;\r
@@ -103,6 +85,20 @@ Returns:
   }\r
 }\r
 \r
+/**\r
+\r
+  Exchange the cache page with the image on the disk\r
+\r
+  @param  Volume                - FAT file system volume.\r
+  @param  DataType              - Indicate the cache type.\r
+  @param  IoMode                - Indicate whether to load this page from disk or store this page to disk.\r
+  @param  CacheTag              - The Cache Tag for the current cache page.\r
+  @param  Task                    point to task instance.\r
+\r
+  @retval EFI_SUCCESS           - Cache page exchanged successfully.\r
+  @return Others                - An error occurred when exchanging cache page.\r
+\r
+**/\r
 STATIC\r
 EFI_STATUS\r
 FatExchangeCachePage (\r
@@ -112,25 +108,6 @@ FatExchangeCachePage (
   IN CACHE_TAG          *CacheTag,\r
   IN FAT_TASK           *Task\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Exchange the cache page with the image on the disk\r
-\r
-Arguments:\r
-\r
-  Volume                - FAT file system volume.\r
-  DataType              - Indicate the cache type.\r
-  IoMode                - Indicate whether to load this page from disk or store this page to disk.\r
-  CacheTag              - The Cache Tag for the current cache page.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - Cache page exchanged successfully.\r
-  Others                - An error occurred when exchanging cache page.\r
-\r
---*/\r
 {\r
   EFI_STATUS  Status;\r
   UINTN       GroupNo;\r
@@ -181,6 +158,19 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+\r
+  Get one cache page by specified PageNo.\r
+\r
+  @param  Volume                - FAT file system volume.\r
+  @param  CacheDataType         - The cache type: CACHE_FAT or CACHE_DATA.\r
+  @param  PageNo                - PageNo to match with the cache.\r
+  @param  CacheTag              - The Cache Tag for the current cache page.\r
+\r
+  @retval EFI_SUCCESS           - Get the cache page successfully.\r
+  @return other                 - An error occurred when accessing data.\r
+\r
+**/\r
 STATIC\r
 EFI_STATUS\r
 FatGetCachePage (\r
@@ -189,25 +179,6 @@ FatGetCachePage (
   IN UINTN              PageNo,\r
   IN CACHE_TAG          *CacheTag\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Get one cache page by specified PageNo.\r
-\r
-Arguments:\r
-\r
-  Volume                - FAT file system volume.\r
-  CacheDataType         - The cache type: CACHE_FAT or CACHE_DATA.\r
-  PageNo                - PageNo to match with the cache.\r
-  CacheTag              - The Cache Tag for the current cache page.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - Get the cache page successfully.\r
-  other                 - An error occurred when accessing data.\r
-\r
---*/\r
 {\r
   EFI_STATUS  Status;\r
   UINTN       OldPageNo;\r
@@ -238,6 +209,23 @@ Returns:
   return Status;\r
 }\r
 \r
+/**\r
+\r
+  Read Length bytes from the position of Offset into Buffer, or\r
+  write Length bytes from Buffer into the position of Offset.\r
+\r
+  @param  Volume                - FAT file system volume.\r
+  @param  CacheDataType         - The type of cache: CACHE_DATA or CACHE_FAT.\r
+  @param  IoMode                - Indicate the type of disk access.\r
+  @param  PageNo                - The number of unaligned cache page.\r
+  @param  Offset                - The starting byte of cache page.\r
+  @param  Length                - The number of bytes that is read or written\r
+  @param  Buffer                - Buffer containing cache data.\r
+\r
+  @retval EFI_SUCCESS           - The data was accessed correctly.\r
+  @return Others                - An error occurred when accessing unaligned cache page.\r
+\r
+**/\r
 STATIC\r
 EFI_STATUS\r
 FatAccessUnalignedCachePage (\r
@@ -249,28 +237,6 @@ FatAccessUnalignedCachePage (
   IN     UINTN             Length,\r
   IN OUT VOID              *Buffer\r
   )\r
-/*++\r
-Routine Description:\r
-\r
-  Read Length bytes from the position of Offset into Buffer, or\r
-  write Length bytes from Buffer into the position of Offset.\r
-\r
-Arguments:\r
-\r
-  Volume                - FAT file system volume.\r
-  CacheDataType         - The type of cache: CACHE_DATA or CACHE_FAT.\r
-  IoMode                - Indicate the type of disk access.\r
-  PageNo                - The number of unaligned cache page.\r
-  Offset                - The starting byte of cache page.\r
-  Length                - The number of bytes that is read or written\r
-  Buffer                - Buffer containing cache data.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - The data was accessed correctly.\r
-  Others                - An error occurred when accessing unaligned cache page.\r
-\r
---*/\r
 {\r
   EFI_STATUS  Status;\r
   VOID        *Source;\r
@@ -299,18 +265,7 @@ Returns:
   return Status;\r
 }\r
 \r
-EFI_STATUS\r
-FatAccessCache (\r
-  IN     FAT_VOLUME         *Volume,\r
-  IN     CACHE_DATA_TYPE    CacheDataType,\r
-  IN     IO_MODE            IoMode,\r
-  IN     UINT64             Offset,\r
-  IN     UINTN              BufferSize,\r
-  IN OUT UINT8              *Buffer,\r
-  IN     FAT_TASK           *Task\r
-  )\r
-/*++\r
-Routine Description:\r
+/**\r
 \r
   Read BufferSize bytes from the position of Offset into Buffer,\r
   or write BufferSize bytes from Buffer into the position of Offset.\r
@@ -326,22 +281,29 @@ Routine Description:
      The UnderRun data and OverRun data will be accessed by the Data cache,\r
      but the Aligned data will be accessed with disk directly.\r
 \r
-Arguments:\r
-\r
-  Volume                - FAT file system volume.\r
-  CacheDataType         - The type of cache: CACHE_DATA or CACHE_FAT.\r
-  IoMode                - Indicate the type of disk access.\r
-  Offset                - The starting byte offset to read from.\r
-  BufferSize            - Size of Buffer.\r
-  Buffer                - Buffer containing cache data.\r
+  @param  Volume                - FAT file system volume.\r
+  @param  CacheDataType         - The type of cache: CACHE_DATA or CACHE_FAT.\r
+  @param  IoMode                - Indicate the type of disk access.\r
+  @param  Offset                - The starting byte offset to read from.\r
+  @param  BufferSize            - Size of Buffer.\r
+  @param  Buffer                - Buffer containing cache data.\r
+  @param  Task                    point to task instance.\r
 \r
-Returns:\r
+  @retval EFI_SUCCESS           - The data was accessed correctly.\r
+  @retval EFI_MEDIA_CHANGED     - The MediaId does not match the current device.\r
+  @return Others                - An error occurred when accessing cache.\r
 \r
-  EFI_SUCCESS           - The data was accessed correctly.\r
-  EFI_MEDIA_CHANGED     - The MediaId does not match the current device.\r
-  Others                - An error occurred when accessing cache.\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+FatAccessCache (\r
+  IN     FAT_VOLUME         *Volume,\r
+  IN     CACHE_DATA_TYPE    CacheDataType,\r
+  IN     IO_MODE            IoMode,\r
+  IN     UINT64             Offset,\r
+  IN     UINTN              BufferSize,\r
+  IN OUT UINT8              *Buffer,\r
+  IN     FAT_TASK           *Task\r
+  )\r
 {\r
   EFI_STATUS  Status;\r
   UINTN       PageSize;\r
@@ -421,27 +383,22 @@ Returns:
   return Status;\r
 }\r
 \r
-EFI_STATUS\r
-FatVolumeFlushCache (\r
-  IN FAT_VOLUME         *Volume,\r
-  IN FAT_TASK           *Task\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Flush all the dirty cache back, include the FAT cache and the Data cache.\r
 \r
-Arguments:\r
-\r
-  Volume                - FAT file system volume.\r
+  @param  Volume                - FAT file system volume.\r
+  @param  Task                    point to task instance.\r
 \r
-Returns:\r
+  @retval EFI_SUCCESS           - Flush all the dirty cache back successfully\r
+  @return other                 - An error occurred when writing the data into the disk\r
 \r
-  EFI_SUCCESS           - Flush all the dirty cache back successfully\r
-  other                 - An error occurred when writing the data into the disk\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+FatVolumeFlushCache (\r
+  IN FAT_VOLUME         *Volume,\r
+  IN FAT_TASK           *Task\r
+  )\r
 {\r
   EFI_STATUS      Status;\r
   CACHE_DATA_TYPE CacheDataType;\r
@@ -480,26 +437,20 @@ Returns:
   return Status;\r
 }\r
 \r
-EFI_STATUS\r
-FatInitializeDiskCache (\r
-  IN FAT_VOLUME         *Volume\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Initialize the disk cache according to Volume's FatType.\r
 \r
-Arguments:\r
-\r
-  Volume                - FAT file system volume.\r
+  @param  Volume                - FAT file system volume.\r
 \r
-Returns:\r
+  @retval EFI_SUCCESS           - The disk cache is successfully initialized.\r
+  @retval EFI_OUT_OF_RESOURCES  - Not enough memory to allocate disk cache.\r
 \r
-  EFI_SUCCESS           - The disk cache is successfully initialized.\r
-  EFI_OUT_OF_RESOURCES  - Not enough memory to allocate disk cache.\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+FatInitializeDiskCache (\r
+  IN FAT_VOLUME         *Volume\r
+  )\r
 {\r
   DISK_CACHE  *DiskCache;\r
   UINTN       FatCacheGroupCount;\r
index 2080005adc95321806ee03708a3883b4bce5d628..2e6c0896501d3075295b6fb666abb4ac88fabfb2 100644 (file)
@@ -1,4 +1,5 @@
-/*++\r
+/** @file\r
+  Fat File System driver routines that support EFI driver model.\r
 \r
 Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials are licensed and made available\r
@@ -9,16 +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.c\r
-\r
-Abstract:\r
-\r
-  Fat File System driver routines that support EFI driver model\r
-\r
---*/\r
+**/\r
 \r
 #include "Fat.h"\r
 \r
@@ -72,29 +64,23 @@ EFI_DRIVER_BINDING_PROTOCOL gFatDriverBinding = {
   NULL\r
 };\r
 \r
+/**\r
+\r
+  Register Driver Binding protocol for this driver.\r
+\r
+  @param  ImageHandle           - Handle for the image of this driver.\r
+  @param  SystemTable           - Pointer to the EFI System Table.\r
+\r
+  @retval EFI_SUCCESS           - Driver loaded.\r
+  @return other                 - Driver not loaded.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FatEntryPoint (\r
   IN EFI_HANDLE         ImageHandle,\r
   IN EFI_SYSTEM_TABLE   *SystemTable\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Register Driver Binding protocol for this driver.\r
-\r
-Arguments:\r
-\r
-  ImageHandle           - Handle for the image of this driver.\r
-  SystemTable           - Pointer to the EFI System Table.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - Driver loaded.\r
-  other                 - Driver not loaded.\r
-\r
---*/\r
 {\r
   EFI_STATUS                Status;\r
 \r
@@ -114,27 +100,21 @@ Returns:
   return Status;\r
 }\r
 \r
-EFI_STATUS\r
-EFIAPI\r
-FatUnload (\r
-  IN EFI_HANDLE  ImageHandle\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Unload function for this image. Uninstall DriverBinding protocol.\r
 \r
-Arguments:\r
+  @param ImageHandle           - Handle for the image of this driver.\r
 \r
-  ImageHandle           - Handle for the image of this driver.\r
+  @retval EFI_SUCCESS           - Driver unloaded successfully.\r
+  @return other                 - Driver can not unloaded.\r
 \r
-Returns:\r
-\r
-  EFI_SUCCESS           - Driver unloaded successfully.\r
-  other                 - Driver can not unloaded.\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+FatUnload (\r
+  IN EFI_HANDLE  ImageHandle\r
+  )\r
 {\r
   EFI_STATUS  Status;\r
   EFI_HANDLE  *DeviceHandleBuffer;\r
@@ -224,6 +204,20 @@ Returns:
   return Status;\r
 }\r
 \r
+/**\r
+\r
+  Test to see if this driver can add a file system to ControllerHandle.\r
+  ControllerHandle must support both Disk IO and Block IO protocols.\r
+\r
+  @param  This                  - Protocol instance pointer.\r
+  @param  ControllerHandle      - Handle of device to test.\r
+  @param  RemainingDevicePath   - Not used.\r
+\r
+  @retval EFI_SUCCESS           - This driver supports this device.\r
+  @retval EFI_ALREADY_STARTED   - This driver is already running on this device.\r
+  @return other                 - This driver does not support this device.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FatDriverBindingSupported (\r
@@ -231,26 +225,6 @@ FatDriverBindingSupported (
   IN EFI_HANDLE                   ControllerHandle,\r
   IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Test to see if this driver can add a file system to ControllerHandle.\r
-  ControllerHandle must support both Disk IO and Block IO protocols.\r
-\r
-Arguments:\r
-\r
-  This                  - Protocol instance pointer.\r
-  ControllerHandle      - Handle of device to test.\r
-  RemainingDevicePath   - Not used.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - This driver supports this device.\r
-  EFI_ALREADY_STARTED   - This driver is already running on this device.\r
-  other                 - This driver does not support this device.\r
-\r
---*/\r
 {\r
   EFI_STATUS            Status;\r
   EFI_DISK_IO_PROTOCOL  *DiskIo;\r
@@ -295,35 +269,29 @@ Returns:
   return Status;\r
 }\r
 \r
-EFI_STATUS\r
-EFIAPI\r
-FatDriverBindingStart (\r
-  IN EFI_DRIVER_BINDING_PROTOCOL  *This,\r
-  IN EFI_HANDLE                   ControllerHandle,\r
-  IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Start this driver on ControllerHandle by opening a Block IO and Disk IO\r
   protocol, reading Device Path. Add a Simple File System protocol to\r
   ControllerHandle if the media contains a valid file system.\r
 \r
-Arguments:\r
-\r
-  This                  - Protocol instance pointer.\r
-  ControllerHandle      - Handle of device to bind driver to.\r
-  RemainingDevicePath   - Not used.\r
+  @param  This                  - Protocol instance pointer.\r
+  @param  ControllerHandle      - Handle of device to bind driver to.\r
+  @param  RemainingDevicePath   - Not used.\r
 \r
-Returns:\r
+  @retval EFI_SUCCESS           - This driver is added to DeviceHandle.\r
+  @retval EFI_ALREADY_STARTED   - This driver is already running on DeviceHandle.\r
+  @retval EFI_OUT_OF_RESOURCES  - Can not allocate the memory.\r
+  @return other                 - This driver does not support this device.\r
 \r
-  EFI_SUCCESS           - This driver is added to DeviceHandle.\r
-  EFI_ALREADY_STARTED   - This driver is already running on DeviceHandle.\r
-  EFI_OUT_OF_RESOURCES  - Can not allocate the memory.\r
-  other                 - This driver does not support this device.\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+FatDriverBindingStart (\r
+  IN EFI_DRIVER_BINDING_PROTOCOL  *This,\r
+  IN EFI_HANDLE                   ControllerHandle,\r
+  IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath\r
+  )\r
 {\r
   EFI_STATUS            Status;\r
   EFI_BLOCK_IO_PROTOCOL *BlockIo;\r
@@ -430,6 +398,19 @@ Exit:
   return Status;\r
 }\r
 \r
+/**\r
+\r
+  Stop this driver on ControllerHandle.\r
+\r
+  @param  This                  - Protocol instance pointer.\r
+  @param  ControllerHandle      - Handle of device to stop driver on.\r
+  @param  NumberOfChildren      - Not used.\r
+  @param  ChildHandleBuffer     - Not used.\r
+\r
+  @retval EFI_SUCCESS           - This driver is removed DeviceHandle.\r
+  @return other                 - This driver was not removed from this device.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FatDriverBindingStop (\r
@@ -438,22 +419,6 @@ FatDriverBindingStop (
   IN  UINTN                         NumberOfChildren,\r
   IN  EFI_HANDLE                    *ChildHandleBuffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Stop this driver on ControllerHandle.\r
-\r
-Arguments:\r
-  This                  - Protocol instance pointer.\r
-  ControllerHandle      - Handle of device to stop driver on.\r
-  NumberOfChildren      - Not used.\r
-  ChildHandleBuffer     - Not used.\r
-\r
-Returns:\r
-  EFI_SUCCESS           - This driver is removed DeviceHandle.\r
-  other                 - This driver was not removed from this device.\r
-\r
---*/\r
 {\r
   EFI_STATUS                      Status;\r
   EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *FileSystem;\r
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
index 3f89a3410a57ba4c9cd2cbe538627dc09b128f2b..a4d44054e16bb77b4baec1b4d835df1231c588d7 100644 (file)
@@ -1,4 +1,5 @@
-/*++\r
+/** @file\r
+  Definitions for on-disk FAT structures.\r
 \r
 Copyright (c) 2005, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials are licensed and made available\r
@@ -10,17 +11,7 @@ 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
-  FatFileSystem.h\r
-\r
-Abstract:\r
-\r
-  Definitions for on-disk FAT structures\r
-\r
-Revision History\r
-\r
---*/\r
+**/\r
 \r
 #ifndef _FATFILESYSTEM_H_\r
 #define _FATFILESYSTEM_H_\r
index f393aa6357b396c59c1889fccb4de7c9f1607049..8aa37456ab1c1509e6d858244af5793c54cd4f83 100644 (file)
@@ -1,4 +1,5 @@
-/*++\r
+/** @file\r
+  Functions for manipulating file names.\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
@@ -9,45 +10,28 @@ 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
 \r
-Module Name:\r
-\r
-  FileName.c\r
-\r
-Abstract:\r
+#include "Fat.h"\r
 \r
-  Functions for manipulating file names\r
+/**\r
 \r
-Revision History\r
+  This function checks whether the input FileName is a valid 8.3 short name.\r
+  If the input FileName is a valid 8.3, the output is the 8.3 short name;\r
+  otherwise, the output is the base tag of 8.3 short name.\r
 \r
---*/\r
+  @param  FileName              - The input unicode filename.\r
+  @param  File8Dot3Name         - The output ascii 8.3 short name or base tag of 8.3 short name.\r
 \r
-#include "Fat.h"\r
+  @retval TRUE                  - The input unicode filename is a valid 8.3 short name.\r
+  @retval FALSE                 - The input unicode filename is not a valid 8.3 short name.\r
 \r
+**/\r
 BOOLEAN\r
 FatCheckIs8Dot3Name (\r
   IN  CHAR16    *FileName,\r
   OUT CHAR8     *File8Dot3Name\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  This function checks whether the input FileName is a valid 8.3 short name.\r
-  If the input FileName is a valid 8.3, the output is the 8.3 short name;\r
-  otherwise, the output is the base tag of 8.3 short name.\r
-\r
-Arguments:\r
-\r
-  FileName              - The input unicode filename.\r
-  File8Dot3Name         - The output ascii 8.3 short name or base tag of 8.3 short name.\r
-\r
-Returns:\r
-\r
-  TRUE                  - The input unicode filename is a valid 8.3 short name.\r
-  FALSE                 - The input unicode filename is not a valid 8.3 short name.\r
-\r
---*/\r
 {\r
   BOOLEAN PossibleShortName;\r
   CHAR16  *TempName;\r
@@ -118,28 +102,22 @@ Returns:
   return PossibleShortName;\r
 }\r
 \r
-STATIC\r
-UINTN\r
-FatTrimAsciiTrailingBlanks (\r
-  IN CHAR8        *Name,\r
-  IN UINTN        Len\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Trim the trailing blanks of fat name.\r
 \r
-Arguments:\r
-\r
-  Name                  - The Char8 string needs to be trimed.\r
-  Len                   - The length of the fat name.\r
-\r
-Returns:\r
+  @param  Name                  - The Char8 string needs to be trimed.\r
+  @param  Len                   - The length of the fat name.\r
 \r
   The real length of the fat name after the trailing blanks are trimmed.\r
 \r
---*/\r
+**/\r
+STATIC\r
+UINTN\r
+FatTrimAsciiTrailingBlanks (\r
+  IN CHAR8        *Name,\r
+  IN UINTN        Len\r
+  )\r
 {\r
   while (Len > 0 && Name[Len - 1] == ' ') {\r
     Len--;\r
@@ -148,6 +126,17 @@ Returns:
   return Len;\r
 }\r
 \r
+/**\r
+\r
+  Convert the ascii fat name to the unicode string and strip trailing spaces,\r
+  and if necessary, convert the unicode string to lower case.\r
+\r
+  @param  FatName               - The Char8 string needs to be converted.\r
+  @param  Len                   - The length of the fat name.\r
+  @param  LowerCase             - Indicate whether to convert the string to lower case.\r
+  @param  Str                   - The result of the convertion.\r
+\r
+**/\r
 VOID\r
 FatNameToStr (\r
   IN  CHAR8            *FatName,\r
@@ -155,25 +144,6 @@ FatNameToStr (
   IN  UINTN            LowerCase,\r
   OUT CHAR16           *Str\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Convert the ascii fat name to the unicode string and strip trailing spaces,\r
-  and if necessary, convert the unicode string to lower case.\r
-\r
-Arguments:\r
-\r
-  FatName               - The Char8 string needs to be converted.\r
-  Len                   - The length of the fat name.\r
-  LowerCase             - Indicate whether to convert the string to lower case.\r
-  Str                   - The result of the convertion.\r
-\r
-Returns:\r
-\r
-  None.\r
-\r
---*/\r
 {\r
   //\r
   // First, trim the trailing blanks\r
@@ -192,27 +162,19 @@ Returns:
   }\r
 }\r
 \r
+/**\r
+\r
+  This function generates 8Dot3 name from user specified name for a newly created file.\r
+\r
+  @param  Parent                - The parent directory.\r
+  @param  DirEnt                - The directory entry whose 8Dot3Name needs to be generated.\r
+\r
+**/\r
 VOID\r
 FatCreate8Dot3Name (\r
   IN FAT_OFILE    *Parent,\r
   IN FAT_DIRENT   *DirEnt\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  This function generates 8Dot3 name from user specified name for a newly created file.\r
-\r
-Arguments:\r
-\r
-  Parent                - The parent directory.\r
-  DirEnt                - The directory entry whose 8Dot3Name needs to be generated.\r
-\r
-Returns:\r
-\r
-  None.\r
-\r
---*/\r
 {\r
   CHAR8 *ShortName;\r
   CHAR8 *ShortNameChar;\r
@@ -275,29 +237,23 @@ Returns:
   }\r
 }\r
 \r
-STATIC\r
-UINT8\r
-FatCheckNameCase (\r
-  IN CHAR16           *Str,\r
-  IN UINT8            InCaseFlag\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Check the string is lower case or upper case\r
   and it is used by fatname to dir entry count\r
 \r
-Arguments:\r
-\r
-  Str                   - The string which needs to be checked.\r
-  InCaseFlag            - The input case flag which is returned when the string is lower case.\r
+  @param Str                   - The string which needs to be checked.\r
+  @param InCaseFlag            - The input case flag which is returned when the string is lower case.\r
 \r
-Returns:\r
+  @retval OutCaseFlag           - The output case flag.\r
 \r
-  OutCaseFlag           - The output case flag.\r
-\r
---*/\r
+**/\r
+STATIC\r
+UINT8\r
+FatCheckNameCase (\r
+  IN CHAR16           *Str,\r
+  IN UINT8            InCaseFlag\r
+  )\r
 {\r
   CHAR16  Buffer[FAT_MAIN_NAME_LEN + 1 + FAT_EXTEND_NAME_LEN + 1];\r
   UINT8   OutCaseFlag;\r
@@ -328,25 +284,17 @@ Returns:
   return OutCaseFlag;\r
 }\r
 \r
-VOID\r
-FatSetCaseFlag (\r
-  IN FAT_DIRENT   *DirEnt\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Set the caseflag value for the directory entry.\r
 \r
-Arguments:\r
-\r
-  DirEnt                - The logical directory entry whose caseflag value is to be set.\r
-\r
-Returns:\r
-\r
-  None.\r
+  @param DirEnt                - The logical directory entry whose caseflag value is to be set.\r
 \r
---*/\r
+**/\r
+VOID\r
+FatSetCaseFlag (\r
+  IN FAT_DIRENT   *DirEnt\r
+  )\r
 {\r
   CHAR16  LfnBuffer[FAT_MAIN_NAME_LEN + 1 + FAT_EXTEND_NAME_LEN + 1];\r
   CHAR16  *TempCharPtr;\r
@@ -389,28 +337,21 @@ Returns:
   }\r
 }\r
 \r
+/**\r
+\r
+  Convert the 8.3 ASCII fat name to cased Unicode string according to case flag.\r
+\r
+  @param  DirEnt                - The corresponding directory entry.\r
+  @param  FileString            - The output Unicode file name.\r
+  @param  FileStringMax           The max length of FileString.\r
+\r
+**/\r
 VOID\r
 FatGetFileNameViaCaseFlag (\r
   IN     FAT_DIRENT   *DirEnt,\r
   IN OUT CHAR16       *FileString,\r
   IN     UINTN        FileStringMax\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Convert the 8.3 ASCII fat name to cased Unicode string according to case flag.\r
-\r
-Arguments:\r
-\r
-  DirEnt                - The corresponding directory entry.\r
-  FileString            - The output Unicode file name.\r
-\r
-Returns:\r
-\r
-  None.\r
-\r
---*/\r
 {\r
   UINT8   CaseFlag;\r
   CHAR8   *File8Dot3Name;\r
@@ -429,25 +370,19 @@ Returns:
   }\r
 }\r
 \r
-UINT8\r
-FatCheckSum (\r
-  IN CHAR8  *ShortNameString\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Get the Check sum for a short name.\r
 \r
-Arguments:\r
+  @param  ShortNameString       - The short name for a file.\r
 \r
-  ShortNameString       - The short name for a file.\r
+  @retval Sum                   - UINT8 checksum.\r
 \r
-Returns:\r
-\r
-  Sum                   - UINT8 checksum.\r
-\r
---*/\r
+**/\r
+UINT8\r
+FatCheckSum (\r
+  IN CHAR8  *ShortNameString\r
+  )\r
 {\r
   UINTN ShortNameLen;\r
   UINT8 Sum;\r
@@ -459,29 +394,23 @@ Returns:
   return Sum;\r
 }\r
 \r
-CHAR16 *\r
-FatGetNextNameComponent (\r
-  IN  CHAR16      *Path,\r
-  OUT CHAR16      *Name\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Takes Path as input, returns the next name component\r
   in Name, and returns the position after Name (e.g., the\r
   start of the next name component)\r
 \r
-Arguments:\r
-\r
-  Path                  - The path of one file.\r
-  Name                  - The next name component in Path.\r
-\r
-Returns:\r
+  @param  Path                  - The path of one file.\r
+  @param  Name                  - The next name component in Path.\r
 \r
   The position after Name in the Path\r
 \r
---*/\r
+**/\r
+CHAR16 *\r
+FatGetNextNameComponent (\r
+  IN  CHAR16      *Path,\r
+  OUT CHAR16      *Name\r
+  )\r
 {\r
   while (*Path != 0 && *Path != PATH_NAME_SEPARATOR) {\r
     *Name++ = *Path++;\r
@@ -497,31 +426,24 @@ Returns:
   return Path;\r
 }\r
 \r
-BOOLEAN\r
-FatFileNameIsValid (\r
-  IN  CHAR16  *InputFileName,\r
-  OUT CHAR16  *OutputFileName\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Check whether the IFileName is valid long file name. If the IFileName is a valid\r
   long file name, then we trim the possible leading blanks and leading/trailing dots.\r
   the trimmed filename is stored in OutputFileName\r
 \r
-Arguments:\r
+  @param  InputFileName         - The input file name.\r
+  @param  OutputFileName        - The output file name.\r
 \r
-  InputFileName         - The input file name.\r
-  OutputFileName        - The output file name.\r
+  @retval TRUE                  - The InputFileName is a valid long file name.\r
+  @retval FALSE                 - The InputFileName is not a valid long file name.\r
 \r
-\r
-Returns:\r
-\r
-  TRUE                  - The InputFileName is a valid long file name.\r
-  FALSE                 - The InputFileName is not a valid long file name.\r
-\r
---*/\r
+**/\r
+BOOLEAN\r
+FatFileNameIsValid (\r
+  IN  CHAR16  *InputFileName,\r
+  OUT CHAR16  *OutputFileName\r
+  )\r
 {\r
   CHAR16  *TempNamePointer;\r
   CHAR16  TempChar;\r
index db44a331a84b6af26e80e9bc61a12750954359f3..1254cd68b55a643f760889e3377944a2db9a1e64 100644 (file)
@@ -1,4 +1,5 @@
-/*++\r
+/** @file\r
+  Routines dealing with disk spaces and FAT table entries.\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
@@ -10,43 +11,28 @@ 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
-  FileSpace.c\r
+**/\r
 \r
-Abstract:\r
+#include "Fat.h"\r
 \r
-  Routines dealing with disk spaces and FAT table entries\r
 \r
-Revision History\r
+/**\r
 \r
---*/\r
+  Get the FAT entry of the volume, which is identified with the Index.\r
 \r
-#include "Fat.h"\r
+  @param  Volume                - FAT file system volume.\r
+  @param  Index                 - The index of the FAT entry of the volume.\r
 \r
+  @return The buffer of the FAT entry\r
 \r
+**/\r
 STATIC\r
 VOID *\r
 FatLoadFatEntry (\r
   IN FAT_VOLUME       *Volume,\r
   IN UINTN            Index\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Get the FAT entry of the volume, which is identified with the Index.\r
-\r
-Arguments:\r
-\r
-  Volume                - FAT file system volume.\r
-  Index                 - The index of the FAT entry of the volume.\r
-\r
-Returns:\r
-\r
-  The buffer of the FAT entry\r
-\r
---*/\r
 {\r
   UINTN       Pos;\r
   EFI_STATUS  Status;\r
@@ -89,28 +75,22 @@ Returns:
   return &Volume->FatEntryBuffer;\r
 }\r
 \r
+/**\r
+\r
+  Get the FAT entry value of the volume, which is identified with the Index.\r
+\r
+  @param  Volume                - FAT file system volume.\r
+  @param  Index                 - The index of the FAT entry of the volume.\r
+\r
+  @return  The value of the FAT entry.\r
+\r
+**/\r
 STATIC\r
 UINTN\r
 FatGetFatEntry (\r
   IN FAT_VOLUME       *Volume,\r
   IN UINTN            Index\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Get the FAT entry value of the volume, which is identified with the Index.\r
-\r
-Arguments:\r
-\r
-  Volume                - FAT file system volume.\r
-  Index                 - The index of the FAT entry of the volume.\r
-\r
-Returns:\r
-\r
-  The value of the FAT entry.\r
-\r
---*/\r
 {\r
   VOID    *Pos;\r
   UINT8   *En12;\r
@@ -147,6 +127,19 @@ Returns:
   return Accum;\r
 }\r
 \r
+/**\r
+\r
+  Set the FAT entry value of the volume, which is identified with the Index.\r
+\r
+  @param  Volume                - FAT file system volume.\r
+  @param  Index                 - The index of the FAT entry of the volume.\r
+  @param  Value                 - The new value of the FAT entry.\r
+\r
+  @retval EFI_SUCCESS           - Set the new FAT entry value sucessfully.\r
+  @retval EFI_VOLUME_CORRUPTED  - The FAT type of the volume is error.\r
+  @return other                 - An error occurred when operation the FAT entries.\r
+\r
+**/\r
 STATIC\r
 EFI_STATUS\r
 FatSetFatEntry (\r
@@ -154,25 +147,6 @@ FatSetFatEntry (
   IN UINTN            Index,\r
   IN UINTN            Value\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Set the FAT entry value of the volume, which is identified with the Index.\r
-\r
-Arguments:\r
-\r
-  Volume                - FAT file system volume.\r
-  Index                 - The index of the FAT entry of the volume.\r
-  Value                 - The new value of the FAT entry.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - Set the new FAT entry value sucessfully.\r
-  EFI_VOLUME_CORRUPTED  - The FAT type of the volume is error.\r
-  other                 - An error occurred when operation the FAT entries.\r
-\r
---*/\r
 {\r
   VOID        *Pos;\r
   UINT8       *En12;\r
@@ -253,29 +227,23 @@ Returns:
   return Status;\r
 }\r
 \r
+/**\r
+\r
+  Free the cluster clain.\r
+\r
+  @param  Volume                - FAT file system volume.\r
+  @param  Cluster               - The first cluster of cluster chain.\r
+\r
+  @retval EFI_SUCCESS           - The cluster chain is freed successfully.\r
+  @retval EFI_VOLUME_CORRUPTED  - There are errors in the file's clusters.\r
+\r
+**/\r
 STATIC\r
 EFI_STATUS\r
 FatFreeClusters (\r
   IN FAT_VOLUME           *Volume,\r
   IN UINTN                Cluster\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Free the cluster clain.\r
-\r
-Arguments:\r
-\r
-  Volume                - FAT file system volume.\r
-  Cluster               - The first cluster of cluster chain.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - The cluster chain is freed successfully.\r
-  EFI_VOLUME_CORRUPTED  - There are errors in the file's clusters.\r
-\r
---*/\r
 {\r
   UINTN LastCluster;\r
 \r
@@ -294,26 +262,20 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
-STATIC\r
-UINTN\r
-FatAllocateCluster (\r
-  IN FAT_VOLUME   *Volume\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Allocate a free cluster and return the cluster index.\r
 \r
-Arguments:\r
-\r
-  Volume                - FAT file system volume.\r
+  @param  Volume                - FAT file system volume.\r
 \r
-Returns:\r
+  @return The index of the free cluster\r
 \r
-  The index of the free cluster\r
-\r
---*/\r
+**/\r
+STATIC\r
+UINTN\r
+FatAllocateCluster (\r
+  IN FAT_VOLUME   *Volume\r
+  )\r
 {\r
   UINTN Cluster;\r
 \r
@@ -354,28 +316,22 @@ Returns:
   return Cluster;\r
 }\r
 \r
+/**\r
+\r
+  Count the number of clusters given a size.\r
+\r
+  @param  Volume                - The file system volume.\r
+  @param  Size                  - The size in bytes.\r
+\r
+  @return The number of the clusters.\r
+\r
+**/\r
 STATIC\r
 UINTN\r
 FatSizeToClusters (\r
   IN FAT_VOLUME       *Volume,\r
   IN UINTN            Size\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Count the number of clusters given a size\r
-\r
-Arguments:\r
-\r
-  Volume                - The file system volume.\r
-  Size                  - The size in bytes.\r
-\r
-Returns:\r
-\r
-  The number of the clusters.\r
-\r
---*/\r
 {\r
   UINTN Clusters;\r
 \r
@@ -387,26 +343,20 @@ Returns:
   return Clusters;\r
 }\r
 \r
-EFI_STATUS\r
-FatShrinkEof (\r
-  IN FAT_OFILE            *OFile\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Shrink the end of the open file base on the file size.\r
 \r
-Arguments:\r
-\r
-  OFile                 - The open file.\r
+  @param  OFile                 - The open file.\r
 \r
-Returns:\r
+  @retval EFI_SUCCESS           - Shrinked sucessfully.\r
+  @retval EFI_VOLUME_CORRUPTED  - There are errors in the file's clusters.\r
 \r
-  EFI_SUCCESS           - Shrinked sucessfully.\r
-  EFI_VOLUME_CORRUPTED  - There are errors in the file's clusters.\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+FatShrinkEof (\r
+  IN FAT_OFILE            *OFile\r
+  )\r
 {\r
   FAT_VOLUME  *Volume;\r
   UINTN       NewSize;\r
@@ -465,30 +415,24 @@ Returns:
   return FatFreeClusters (Volume, Cluster);\r
 }\r
 \r
-EFI_STATUS\r
-FatGrowEof (\r
-  IN FAT_OFILE            *OFile,\r
-  IN UINT64               NewSizeInBytes\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Grow the end of the open file base on the NewSizeInBytes.\r
 \r
-Arguments:\r
-\r
-  OFile                 - The open file.\r
-  NewSizeInBytes        - The new size in bytes of the open file.\r
+  @param  OFile                 - The open file.\r
+  @param  NewSizeInBytes        - The new size in bytes of the open file.\r
 \r
-Returns:\r
+  @retval EFI_SUCCESS           - The file is grown sucessfully.\r
+  @retval EFI_UNSUPPORTED       - The file size is larger than 4GB.\r
+  @retval EFI_VOLUME_CORRUPTED  - There are errors in the files' clusters.\r
+  @retval EFI_VOLUME_FULL       - The volume is full and can not grow the file.\r
 \r
-  EFI_SUCCESS           - The file is grown sucessfully.\r
-  EFI_UNSUPPORTED       - The file size is larger than 4GB.\r
-  EFI_VOLUME_CORRUPTED  - There are errors in the files' clusters.\r
-  EFI_VOLUME_FULL       - The volume is full and can not grow the file.\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+FatGrowEof (\r
+  IN FAT_OFILE            *OFile,\r
+  IN UINT64               NewSizeInBytes\r
+  )\r
 {\r
   FAT_VOLUME  *Volume;\r
   EFI_STATUS  Status;\r
@@ -591,31 +535,25 @@ Done:
   return Status;\r
 }\r
 \r
-EFI_STATUS\r
-FatOFilePosition (\r
-  IN FAT_OFILE            *OFile,\r
-  IN UINTN                Position,\r
-  IN UINTN                PosLimit\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Seek OFile to requested position, and calculate the number of\r
   consecutive clusters from the position in the file\r
 \r
-Arguments:\r
-\r
-  OFile                 - The open file.\r
-  Position              - The file's position which will be accessed.\r
-  PosLimit              - The maximum length current reading/writing may access\r
+  @param  OFile                 - The open file.\r
+  @param  Position              - The file's position which will be accessed.\r
+  @param  PosLimit              - The maximum length current reading/writing may access\r
 \r
-Returns:\r
+  @retval EFI_SUCCESS           - Set the info successfully.\r
+  @retval EFI_VOLUME_CORRUPTED  - Cluster chain corrupt.\r
 \r
-  EFI_SUCCESS           - Set the info successfully.\r
-  EFI_VOLUME_CORRUPTED  - Cluster chain corrupt.\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+FatOFilePosition (\r
+  IN FAT_OFILE            *OFile,\r
+  IN UINTN                Position,\r
+  IN UINTN                PosLimit\r
+  )\r
 {\r
   FAT_VOLUME  *Volume;\r
   UINTN       ClusterSize;\r
@@ -691,28 +629,22 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
-UINTN\r
-FatPhysicalDirSize (\r
-  IN FAT_VOLUME            *Volume,\r
-  IN UINTN                 Cluster\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Get the size of directory of the open file\r
+/**\r
 \r
-Arguments:\r
+  Get the size of directory of the open file.\r
 \r
-  Volume                - The File System Volume.\r
-  Cluster               - The Starting cluster.\r
+  @param  Volume                - The File System Volume.\r
+  @param  Cluster               - The Starting cluster.\r
 \r
-Returns:\r
-\r
-  The physical size of the file starting at the input cluster, if there is error in the\r
+  @return The physical size of the file starting at the input cluster, if there is error in the\r
   cluster chain, the return value is 0.\r
 \r
---*/\r
+**/\r
+UINTN\r
+FatPhysicalDirSize (\r
+  IN FAT_VOLUME            *Volume,\r
+  IN UINTN                 Cluster\r
+  )\r
 {\r
   UINTN Size;\r
   ASSERT_VOLUME_LOCKED (Volume);\r
@@ -742,27 +674,21 @@ Returns:
   return Size;\r
 }\r
 \r
+/**\r
+\r
+  Get the physical size of a file on the disk.\r
+\r
+  @param  Volume                - The file system volume.\r
+  @param  RealSize              - The real size of a file.\r
+\r
+  @return The physical size of a file on the disk.\r
+\r
+**/\r
 UINT64\r
 FatPhysicalFileSize (\r
   IN FAT_VOLUME            *Volume,\r
   IN UINTN                 RealSize\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Get the physical size of a file on the disk.\r
-\r
-Arguments:\r
-\r
-  Volume                - The file system volume.\r
-  RealSize              - The real size of a file.\r
-\r
-Returns:\r
-\r
-  The physical size of a file on the disk.\r
-\r
---*/\r
 {\r
   UINTN   ClusterSizeMask;\r
   UINT64  PhysicalSize;\r
@@ -771,25 +697,17 @@ Returns:
   return PhysicalSize;\r
 }\r
 \r
-VOID\r
-FatComputeFreeInfo (\r
-  IN FAT_VOLUME *Volume\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Update the free cluster info of FatInfoSector of the volume.\r
 \r
-Arguments:\r
-\r
-  Volume                - FAT file system volume.\r
-\r
-Returns:\r
-\r
-  None.\r
+  @param  Volume                - FAT file system volume.\r
 \r
---*/\r
+**/\r
+VOID\r
+FatComputeFreeInfo (\r
+  IN FAT_VOLUME *Volume\r
+  )\r
 {\r
   UINTN Index;\r
 \r
index 172f2023dabe846fdbe24c6c04d9bc27443254a5..9cb0d9ac189123bdcf93e64a58e53e7e3fe02dfc 100644 (file)
@@ -1,4 +1,5 @@
-/*++\r
+/** @file\r
+  Routines that check references and flush OFiles\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
@@ -10,45 +11,29 @@ 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
-  flush.c\r
+**/\r
 \r
-Abstract:\r
+#include "Fat.h"\r
 \r
-  Routines that check references and flush OFiles\r
+/**\r
 \r
-Revision History\r
+  Flushes all data associated with the file handle.\r
 \r
---*/\r
+  @param  FHand                 - Handle to file to flush.\r
+  @param  Token                 - A pointer to the token associated with the transaction.\r
 \r
-#include "Fat.h"\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
-  FHand                 - Handle to file to flush.\r
-  Token                 - A pointer to the token associated with the transaction.\r
-\r
-Returns:\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
-\r
---*/\r
 {\r
   FAT_IFILE   *IFile;\r
   FAT_OFILE   *OFile;\r
@@ -113,53 +98,41 @@ Returns:
   return Status;\r
 }\r
 \r
-EFI_STATUS\r
-EFIAPI\r
-FatFlush (\r
-  IN EFI_FILE_PROTOCOL  *FHand\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Flushes all data associated with the file handle.\r
 \r
-Arguments:\r
-\r
-  FHand                 - Handle to file to flush.\r
-\r
-Returns:\r
+  @param  FHand                 - Handle to file to flush.\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
-\r
---*/\r
-{\r
-  return FatFlushEx (FHand, NULL);\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
-FatClose (\r
+FatFlush (\r
   IN EFI_FILE_PROTOCOL  *FHand\r
   )\r
-/*++\r
+{\r
+  return FatFlushEx (FHand, NULL);\r
+}\r
 \r
-Routine Description:\r
+/**\r
 \r
   Flushes & Closes the file handle.\r
 \r
-Arguments:\r
-\r
-  FHand                 - Handle to the file to delete.\r
-\r
-Returns:\r
+  @param  FHand                 - Handle to the file to delete.\r
 \r
-  EFI_SUCCESS           - Closed the file successfully.\r
+  @retval EFI_SUCCESS           - Closed the file successfully.\r
 \r
---*/\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+FatClose (\r
+  IN EFI_FILE_PROTOCOL  *FHand\r
+  )\r
 {\r
   FAT_IFILE   *IFile;\r
   FAT_OFILE   *OFile;\r
@@ -191,25 +164,19 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
-EFI_STATUS\r
-FatIFileClose (\r
-  FAT_IFILE           *IFile\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Close the open file instance.\r
 \r
-Arguments:\r
+  @param  IFile                 - Open file instance.\r
 \r
-  IFile                 - Open file instance.\r
+  @retval EFI_SUCCESS           - Closed the file successfully.\r
 \r
-Returns:\r
-\r
-  EFI_SUCCESS           - Closed the file successfully.\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+FatIFileClose (\r
+  FAT_IFILE           *IFile\r
+  )\r
 {\r
   FAT_OFILE   *OFile;\r
   FAT_VOLUME  *Volume;\r
@@ -239,27 +206,21 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
-EFI_STATUS\r
-FatOFileFlush (\r
-  IN FAT_OFILE    *OFile\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Flush the data associated with an open file.\r
   In this implementation, only last Mod/Access time is updated.\r
 \r
-Arguments:\r
+  @param  OFile                 - The open file.\r
 \r
-  OFile                 - The open file.\r
+  @retval EFI_SUCCESS           - The OFile is flushed successfully.\r
+  @return Others                - An error occurred when flushing this OFile.\r
 \r
-Returns:\r
-\r
-  EFI_SUCCESS           - The OFile is flushed successfully.\r
-  Others                - An error occurred when flushing this OFile.\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+FatOFileFlush (\r
+  IN FAT_OFILE    *OFile\r
+  )\r
 {\r
   EFI_STATUS    Status;\r
   FAT_OFILE     *Parent;\r
@@ -318,28 +279,22 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
-BOOLEAN\r
-FatCheckOFileRef (\r
-  IN FAT_OFILE   *OFile\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Check the references of the OFile.\r
   If the OFile (that is checked) is no longer\r
   referenced, then it is freed.\r
 \r
-Arguments:\r
+  @param  OFile                 - The OFile to be checked.\r
 \r
-  OFile                 - The OFile to be checked.\r
+  @retval TRUE                  - The OFile is not referenced and freed.\r
+  @retval FALSE                 - The OFile is kept.\r
 \r
-Returns:\r
-\r
-  TRUE                  - The OFile is not referenced and freed.\r
-  FALSE                 - The OFile is kept.\r
-\r
---*/\r
+**/\r
+BOOLEAN\r
+FatCheckOFileRef (\r
+  IN FAT_OFILE   *OFile\r
+  )\r
 {\r
   //\r
   // If the OFile is on the check ref list, remove it\r
@@ -366,29 +321,21 @@ Returns:
   return TRUE;\r
 }\r
 \r
-STATIC\r
-VOID\r
-FatCheckVolumeRef (\r
-  IN FAT_VOLUME   *Volume\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Check the references of all open files on the volume.\r
   Any open file (that is checked) that is no longer\r
   referenced, is freed - and it's parent open file\r
   is then referenced checked.\r
 \r
-Arguments:\r
-\r
-  Volume                - The volume to check the pending open file list.\r
-\r
-Returns:\r
+  @param  Volume                - The volume to check the pending open file list.\r
 \r
-  None\r
-\r
---*/\r
+**/\r
+STATIC\r
+VOID\r
+FatCheckVolumeRef (\r
+  IN FAT_VOLUME   *Volume\r
+  )\r
 {\r
   FAT_OFILE *OFile;\r
   FAT_OFILE *Parent;\r
@@ -414,34 +361,29 @@ Returns:
   }\r
 }\r
 \r
-EFI_STATUS\r
-FatCleanupVolume (\r
-  IN FAT_VOLUME       *Volume,\r
-  IN FAT_OFILE        *OFile,\r
-  IN EFI_STATUS       EfiStatus,\r
-  IN FAT_TASK         *Task\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Set error status for a specific OFile, reference checking the volume.\r
   If volume is already marked as invalid, and all resources are freed\r
   after reference checking, the file system protocol is uninstalled and\r
   the volume structure is freed.\r
 \r
-Arguments:\r
+  @param  Volume                - the Volume that is to be reference checked and unlocked.\r
+  @param  OFile                 - the OFile whose permanent error code is to be set.\r
+  @param  EfiStatus             - error code to be set.\r
+  @param  Task                    point to task instance.\r
 \r
-  Volume                - the Volume that is to be reference checked and unlocked.\r
-  OFile                 - the OFile whose permanent error code is to be set.\r
-  EfiStatus             - error code to be set.\r
+  @retval EFI_SUCCESS           - Clean up the volume successfully.\r
+  @return Others                - Cleaning up of the volume is failed.\r
 \r
-Returns:\r
-\r
-  EFI_SUCCESS           - Clean up the volume successfully.\r
-  Others                - Cleaning up of the volume is failed.\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+FatCleanupVolume (\r
+  IN FAT_VOLUME       *Volume,\r
+  IN FAT_OFILE        *OFile,\r
+  IN EFI_STATUS       EfiStatus,\r
+  IN FAT_TASK         *Task\r
+  )\r
 {\r
   EFI_STATUS  Status;\r
   //\r
@@ -499,27 +441,19 @@ Returns:
   return EfiStatus;\r
 }\r
 \r
+/**\r
+\r
+  Set the OFile and its child OFile with the error Status\r
+\r
+  @param  OFile                 - The OFile whose permanent error code is to be set.\r
+  @param  Status                - Error code to be set.\r
+\r
+**/\r
 VOID\r
 FatSetVolumeError (\r
   IN FAT_OFILE            *OFile,\r
   IN EFI_STATUS           Status\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Set the OFile and its child OFile with the error Status\r
-\r
-Arguments:\r
-\r
-  OFile                 - The OFile whose permanent error code is to be set.\r
-  Status                - Error code to be set.\r
-\r
-Returns:\r
-\r
-  None\r
-\r
---*/\r
 {\r
   LIST_ENTRY      *Link;\r
   FAT_OFILE       *ChildOFile;\r
index f827368ef5ebfe8bc4e3cd2d91f4ea8930c14515..5a9bbda754319644858ed8eb12afee98da94ad08 100644 (file)
@@ -1,4 +1,5 @@
-/*++\r
+/** @file\r
+  Hash table operations.\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
@@ -9,41 +10,24 @@ 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
 \r
-Module Name:\r
-\r
-  Hash.c\r
-\r
-Abstract:\r
+#include "Fat.h"\r
 \r
-  Hash table operations\r
+/**\r
 \r
-Revision History\r
+  Get hash value for long name.\r
 \r
---*/\r
+  @param  LongNameString        - The long name string to be hashed.\r
 \r
-#include "Fat.h"\r
+  @return HashValue.\r
 \r
+**/\r
 STATIC\r
 UINT32\r
 FatHashLongName (\r
   IN CHAR16   *LongNameString\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Get hash value for long name.\r
-\r
-Arguments:\r
-\r
-  LongNameString        - The long name string to be hashed.\r
-\r
-Returns:\r
-\r
-  HashValue.\r
-\r
---*/\r
 {\r
   UINT32  HashValue;\r
   CHAR16  UpCasedLongFileName[EFI_PATH_STRING_LENGTH];\r
@@ -58,53 +42,41 @@ Returns:
   return (HashValue & HASH_TABLE_MASK);\r
 }\r
 \r
-STATIC\r
-UINT32\r
-FatHashShortName (\r
-  IN CHAR8   *ShortNameString\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Get hash value for short name.\r
 \r
-Arguments:\r
+  @param  ShortNameString       - The short name string to be hashed.\r
 \r
-  ShortNameString       - The short name string to be hashed.\r
+  @return HashValue\r
 \r
-Returns:\r
-\r
-  HashValue\r
-\r
---*/\r
+**/\r
+STATIC\r
+UINT32\r
+FatHashShortName (\r
+  IN CHAR8   *ShortNameString\r
+  )\r
 {\r
   UINT32  HashValue;\r
   gBS->CalculateCrc32 (ShortNameString, FAT_NAME_LEN, &HashValue);\r
   return (HashValue & HASH_TABLE_MASK);\r
 }\r
 \r
-FAT_DIRENT **\r
-FatLongNameHashSearch (\r
-  IN FAT_ODIR       *ODir,\r
-  IN CHAR16         *LongNameString\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Search the long name hash table for the directory entry.\r
 \r
-Arguments:\r
-\r
-  ODir                  - The directory to be searched.\r
-  LongNameString        - The long name string to search.\r
-\r
-Returns:\r
+  @param  ODir                  - The directory to be searched.\r
+  @param  LongNameString        - The long name string to search.\r
 \r
-  The previous long name hash node of the directory entry.\r
+  @return The previous long name hash node of the directory entry.\r
 \r
---*/\r
+**/\r
+FAT_DIRENT **\r
+FatLongNameHashSearch (\r
+  IN FAT_ODIR       *ODir,\r
+  IN CHAR16         *LongNameString\r
+  )\r
 {\r
   FAT_DIRENT  **PreviousHashNode;\r
   for (PreviousHashNode   = &ODir->LongNameHashTable[FatHashLongName (LongNameString)];\r
@@ -119,27 +91,21 @@ Returns:
   return PreviousHashNode;\r
 }\r
 \r
-FAT_DIRENT **\r
-FatShortNameHashSearch (\r
-  IN FAT_ODIR      *ODir,\r
-  IN CHAR8         *ShortNameString\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Search the short name hash table for the directory entry.\r
 \r
-Arguments:\r
-\r
-  ODir                  - The directory to be searched.\r
-  ShortNameString       - The short name string to search.\r
+  @param  ODir                  - The directory to be searched.\r
+  @param  ShortNameString       - The short name string to search.\r
 \r
-Returns:\r
+  @return The previous short name hash node of the directory entry.\r
 \r
-  The previous short name hash node of the directory entry.\r
-\r
---*/\r
+**/\r
+FAT_DIRENT **\r
+FatShortNameHashSearch (\r
+  IN FAT_ODIR      *ODir,\r
+  IN CHAR8         *ShortNameString\r
+  )\r
 {\r
   FAT_DIRENT  **PreviousHashNode;\r
   for (PreviousHashNode   = &ODir->ShortNameHashTable[FatHashShortName (ShortNameString)];\r
@@ -154,27 +120,19 @@ Returns:
   return PreviousHashNode;\r
 }\r
 \r
+/**\r
+\r
+  Insert directory entry to hash table.\r
+\r
+  @param  ODir                  - The parent directory.\r
+  @param  DirEnt                - The directory entry node.\r
+\r
+**/\r
 VOID\r
 FatInsertToHashTable (\r
   IN FAT_ODIR     *ODir,\r
   IN FAT_DIRENT   *DirEnt\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Insert directory entry to hash table.\r
-\r
-Arguments:\r
-\r
-  ODir                  - The parent directory.\r
-  DirEnt                - The directory entry node.\r
-\r
-Returns:\r
-\r
-  None.\r
-\r
---*/\r
 {\r
   FAT_DIRENT  **HashTable;\r
   UINT32      HashTableIndex;\r
@@ -195,27 +153,19 @@ Returns:
   HashTable[HashTableIndex]     = DirEnt;\r
 }\r
 \r
+/**\r
+\r
+  Delete directory entry from hash table.\r
+\r
+  @param  ODir                  - The parent directory.\r
+  @param  DirEnt                - The directory entry node.\r
+\r
+**/\r
 VOID\r
 FatDeleteFromHashTable (\r
   IN FAT_ODIR     *ODir,\r
   IN FAT_DIRENT   *DirEnt\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Delete directory entry from hash table.\r
-\r
-Arguments:\r
-\r
-  ODir                  - The parent directory.\r
-  DirEnt                - The directory entry node.\r
-\r
-Returns:\r
-\r
-  None.\r
-\r
---*/\r
 {\r
   *FatShortNameHashSearch (ODir, DirEnt->Entry.FileName) = DirEnt->ShortNameForwardLink;\r
   *FatLongNameHashSearch (ODir, DirEnt->FileString)      = DirEnt->LongNameForwardLink;\r
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
index d7cfa823c84ccd3a72c41383d2ba53105cbf2ba0..6febffcddd62f1a5186988d9497b83819ba2df3b 100644 (file)
@@ -1,4 +1,5 @@
-/*++\r
+/** @file\r
+  Initialization routines.\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,19 +10,25 @@ 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
 \r
-Module Name:\r
-\r
-  Init.c\r
+#include "Fat.h"\r
 \r
-Abstract:\r
+/**\r
 \r
-  Initialization routines\r
+  Allocates volume structure, detects FAT file system, installs protocol,\r
+  and initialize cache.\r
 \r
---*/\r
+  @param  Handle                - The handle of parent device.\r
+  @param  DiskIo                - The DiskIo of parent device.\r
+  @param  DiskIo2               - The DiskIo2 of parent device.\r
+  @param  BlockIo               - The BlockIo of parent devicel\r
 \r
-#include "Fat.h"\r
+  @retval EFI_SUCCESS           - Allocate a new volume successfully.\r
+  @retval EFI_OUT_OF_RESOURCES  - Can not allocate the memory.\r
+  @return Others                - Allocating a new volume failed.\r
 \r
+**/\r
 EFI_STATUS\r
 FatAllocateVolume (\r
   IN  EFI_HANDLE                Handle,\r
@@ -29,26 +36,6 @@ FatAllocateVolume (
   IN  EFI_DISK_IO2_PROTOCOL     *DiskIo2,\r
   IN  EFI_BLOCK_IO_PROTOCOL     *BlockIo\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Allocates volume structure, detects FAT file system, installs protocol,\r
-  and initialize cache.\r
-\r
-Arguments:\r
-\r
-  Handle                - The handle of parent device.\r
-  DiskIo                - The DiskIo of parent device.\r
-  BlockIo               - The BlockIo of parent devicel\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - Allocate a new volume successfully.\r
-  EFI_OUT_OF_RESOURCES  - Can not allocate the memory.\r
-  Others                - Allocating a new volume failed.\r
-\r
---*/\r
 {\r
   EFI_STATUS  Status;\r
   FAT_VOLUME  *Volume;\r
@@ -120,26 +107,20 @@ Done:
   return Status;\r
 }\r
 \r
-EFI_STATUS\r
-FatAbandonVolume (\r
-  IN FAT_VOLUME *Volume\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Called by FatDriverBindingStop(), Abandon the volume.\r
 \r
-Arguments:\r
-\r
-  Volume                - The volume to be abandoned.\r
-\r
-Returns:\r
+  @param  Volume                - The volume to be abandoned.\r
 \r
-  EFI_SUCCESS           - Abandoned the volume successfully.\r
-  Others                - Can not uninstall the protocol interfaces.\r
+  @retval EFI_SUCCESS           - Abandoned the volume successfully.\r
+  @return Others                - Can not uninstall the protocol interfaces.\r
 \r
---*/\r
+**/\r
+EFI_STATUS\r
+FatAbandonVolume (\r
+  IN FAT_VOLUME *Volume\r
+  )\r
 {\r
   EFI_STATUS  Status;\r
   BOOLEAN     LockedByMe;\r
@@ -202,27 +183,21 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
-EFI_STATUS\r
-FatOpenDevice (\r
-  IN OUT FAT_VOLUME           *Volume\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Detects FAT file system on Disk and set relevant fields of Volume\r
-\r
-Arguments:\r
+/**\r
 \r
-  Volume                - The volume structure.\r
+  Detects FAT file system on Disk and set relevant fields of Volume.\r
 \r
-Returns:\r
+  @param Volume                - The volume structure.\r
 \r
-  EFI_SUCCESS           - The Fat File System is detected successfully\r
-  EFI_UNSUPPORTED       - The volume is not FAT file system.\r
-  EFI_VOLUME_CORRUPTED  - The volume is corrupted.\r
+  @retval EFI_SUCCESS           - The Fat File System is detected successfully\r
+  @retval EFI_UNSUPPORTED       - The volume is not FAT file system.\r
+  @retval EFI_VOLUME_CORRUPTED  - The volume is corrupted.\r
 \r
---*/\r
+**/\r
+EFI_STATUS\r
+FatOpenDevice (\r
+  IN OUT FAT_VOLUME           *Volume\r
+  )\r
 {\r
   EFI_STATUS            Status;\r
   UINT32                BlockSize;\r
index c5476e8ff843b21359e6f6c748a9885fdb598903..c035670bf78fcc831eae00bc38d2a3e23cc35e5d 100644 (file)
@@ -1,4 +1,5 @@
-/*++\r
+/** @file\r
+  Miscellaneous functions.\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
@@ -10,40 +11,26 @@ 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
-  Misc.c\r
+**/\r
 \r
-Abstract:\r
+#include "Fat.h"\r
+UINT8  mMonthDays[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };\r
 \r
-  Miscellaneous functions\r
+/**\r
 \r
-Revision History\r
+  Create the task\r
 \r
---*/\r
+  @param  IFile                 - The instance of the open file.\r
+  @param  Token                 - A pointer to the token associated with the transaction.\r
 \r
-#include "Fat.h"\r
-UINT8  mMonthDays[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };\r
+  @return FAT_TASK *            - Return the task instance.\r
 \r
+**/\r
 FAT_TASK *\r
 FatCreateTask (\r
   FAT_IFILE           *IFile,\r
   EFI_FILE_IO_TOKEN   *Token\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Create the task\r
-\r
-Arguments:\r
-\r
-  IFile                 - The instance of the open file.\r
-  Token                 - A pointer to the token associated with the transaction.\r
-\r
-Return:\r
-  FAT_TASK *            - Return the task instance.\r
-**/\r
 {\r
   FAT_TASK            *Task;\r
 \r
@@ -58,20 +45,17 @@ Return:
   return Task;\r
 }\r
 \r
-VOID\r
-FatDestroyTask (\r
-  FAT_TASK            *Task\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
-  Destroy the task\r
+  Destroy the task.\r
 \r
-Arguments:\r
+  @param  Task                  - The task to be destroyed.\r
 \r
-  Task                  - The task to be destroyed.\r
 **/\r
+VOID\r
+FatDestroyTask (\r
+  FAT_TASK            *Task\r
+  )\r
 {\r
   LIST_ENTRY          *Link;\r
   FAT_SUBTASK         *Subtask;\r
@@ -84,20 +68,17 @@ Arguments:
   FreePool (Task);\r
 }\r
 \r
-VOID\r
-FatWaitNonblockingTask (\r
-  FAT_IFILE           *IFile\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Wait all non-blocking requests complete.\r
 \r
-Arguments:\r
+  @param  IFile                 - The instance of the open file.\r
 \r
-  IFile                 - The instance of the open file.\r
 **/\r
+VOID\r
+FatWaitNonblockingTask (\r
+  FAT_IFILE           *IFile\r
+  )\r
 {\r
   BOOLEAN             TaskQueueEmpty;\r
 \r
@@ -108,25 +89,19 @@ Arguments:
   } while (!TaskQueueEmpty);\r
 }\r
 \r
-LIST_ENTRY *\r
-FatDestroySubtask (\r
-  FAT_SUBTASK         *Subtask\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Remove the subtask from subtask list.\r
 \r
-Arguments:\r
-\r
-  Subtask               - The subtask to be removed.\r
+  @param  Subtask               - The subtask to be removed.\r
 \r
-Returns:\r
+  @return LIST_ENTRY *          - The next node in the list.\r
 \r
-  LIST_ENTRY *          - The next node in the list.\r
-\r
---*/\r
+**/\r
+LIST_ENTRY *\r
+FatDestroySubtask (\r
+  FAT_SUBTASK         *Subtask\r
+  )\r
 {\r
   LIST_ENTRY          *Link;\r
 \r
@@ -138,28 +113,22 @@ Returns:
   return Link;\r
 }\r
 \r
+/**\r
+\r
+  Execute the task.\r
+\r
+  @param  IFile                 - The instance of the open file.\r
+  @param  Task                  - The task to be executed.\r
+\r
+  @retval EFI_SUCCESS           - The task was executed sucessfully.\r
+  @return other                 - An error occurred when executing the task.\r
+\r
+**/\r
 EFI_STATUS\r
 FatQueueTask (\r
   IN FAT_IFILE        *IFile,\r
   IN FAT_TASK         *Task\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Execute the task\r
-\r
-Arguments:\r
-\r
-  IFile                 - The instance of the open file.\r
-  Task                  - The task to be executed.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - The task was executed sucessfully.\r
-  other                 - An error occurred when executing the task.\r
-\r
---*/\r
 {\r
   EFI_STATUS          Status;\r
   LIST_ENTRY          *Link;\r
@@ -239,30 +208,24 @@ Returns:
   return Status;\r
 }\r
 \r
+/**\r
+\r
+  Set the volume as dirty or not.\r
+\r
+  @param  Volume                - FAT file system volume.\r
+  @param  IoMode                - The access mode.\r
+  @param  DirtyValue            - Set the volume as dirty or not.\r
+\r
+  @retval EFI_SUCCESS           - Set the new FAT entry value sucessfully.\r
+  @return other                 - An error occurred when operation the FAT entries.\r
+\r
+**/\r
 EFI_STATUS\r
 FatAccessVolumeDirty (\r
   IN FAT_VOLUME       *Volume,\r
   IN IO_MODE          IoMode,\r
   IN VOID             *DirtyValue\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Set the volume as dirty or not\r
-\r
-Arguments:\r
-\r
-  Volume                - FAT file system volume.\r
-  IoMode                - The access mode.\r
-  DirtyValue            - Set the volume as dirty or not.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - Set the new FAT entry value sucessfully.\r
-  other                 - An error occurred when operation the FAT entries.\r
-\r
---*/\r
 {\r
   UINTN WriteCount;\r
 \r
@@ -271,7 +234,7 @@ Returns:
 }\r
 \r
 /**\r
-  Invoke a notification event\r
+  Invoke a notification event.\r
 \r
   @param  Event                 Event whose notification function is being invoked.\r
   @param  Context               The pointer to the notification function's context,\r
@@ -284,22 +247,6 @@ FatOnAccessComplete (
   IN  EFI_EVENT                Event,\r
   IN  VOID                     *Context\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Invoke a notification event\r
-  case #1. some subtasks are not completed when the FatOpenEx checks the Task->Subtasks\r
-           - sets Task->SubtaskCollected so callback to signal the event and free the task.\r
-  case #2. all subtasks are completed when the FatOpenEx checks the Task->Subtasks\r
-           - FatOpenEx signal the event and free the task.\r
-Arguments:\r
-\r
-  Event                 - Event whose notification function is being invoked.\r
-  Context               - The pointer to the notification function's context,\r
-                          which is implementation-dependent.\r
-\r
---*/\r
 {\r
   EFI_STATUS             Status;\r
   FAT_SUBTASK            *Subtask;\r
@@ -342,6 +289,22 @@ Arguments:
   }\r
 }\r
 \r
+/**\r
+\r
+  General disk access function.\r
+\r
+  @param  Volume                - FAT file system volume.\r
+  @param  IoMode                - The access mode (disk read/write or cache access).\r
+  @param  Offset                - The starting byte offset to read from.\r
+  @param  BufferSize            - Size of Buffer.\r
+  @param  Buffer                - Buffer containing read data.\r
+  @param  Task                    point to task instance.\r
+\r
+  @retval EFI_SUCCESS           - The operation is performed successfully.\r
+  @retval EFI_VOLUME_CORRUPTED  - The accesss is\r
+  @return Others                - The status of read/write the disk\r
+\r
+**/\r
 EFI_STATUS\r
 FatDiskIo (\r
   IN     FAT_VOLUME       *Volume,\r
@@ -351,27 +314,6 @@ FatDiskIo (
   IN OUT VOID             *Buffer,\r
   IN     FAT_TASK         *Task\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  General disk access function\r
-\r
-Arguments:\r
-\r
-  Volume                - FAT file system volume.\r
-  IoMode                - The access mode (disk read/write or cache access).\r
-  Offset                - The starting byte offset to read from.\r
-  BufferSize            - Size of Buffer.\r
-  Buffer                - Buffer containing read data.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - The operation is performed successfully.\r
-  EFI_VOLUME_CORRUPTED  - The accesss is\r
-  Others                - The status of read/write the disk\r
-\r
---*/\r
 {\r
   EFI_STATUS            Status;\r
   EFI_DISK_IO_PROTOCOL  *DiskIo;\r
@@ -438,97 +380,61 @@ Returns:
   return Status;\r
 }\r
 \r
+/**\r
+\r
+  Lock the volume.\r
+\r
+**/\r
 VOID\r
 FatAcquireLock (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Lock the volume.\r
-\r
-Arguments:\r
-\r
-  None.\r
-\r
-Returns:\r
-\r
-  None.\r
-\r
---*/\r
 {\r
   EfiAcquireLock (&FatFsLock);\r
 }\r
 \r
-EFI_STATUS\r
-FatAcquireLockOrFail (\r
-  VOID\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Lock the volume.\r
   If the lock is already in the acquired state, then EFI_ACCESS_DENIED is returned.\r
   Otherwise, EFI_SUCCESS is returned.\r
 \r
-Arguments:\r
-\r
-  None.\r
+  @retval EFI_SUCCESS           - The volume is locked.\r
+  @retval EFI_ACCESS_DENIED     - The volume could not be locked because it is already locked.\r
 \r
-Returns:\r
-\r
-  EFI_SUCCESS           - The volume is locked.\r
-  EFI_ACCESS_DENIED     - The volume could not be locked because it is already locked.\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+FatAcquireLockOrFail (\r
+  VOID\r
+  )\r
 {\r
   return EfiAcquireLockOrFail (&FatFsLock);\r
 }\r
 \r
+/**\r
+\r
+  Unlock the volume.\r
+\r
+**/\r
 VOID\r
 FatReleaseLock (\r
   VOID\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Unlock the volume.\r
-\r
-Arguments:\r
-\r
-  Null.\r
-\r
-Returns:\r
-\r
-  None.\r
-\r
---*/\r
 {\r
   EfiReleaseLock (&FatFsLock);\r
 }\r
 \r
-VOID\r
-FatFreeDirEnt (\r
-  IN FAT_DIRENT       *DirEnt\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Free directory entry.\r
 \r
-Arguments:\r
-\r
-  DirEnt                - The directory entry to be freed.\r
+  @param  DirEnt                - The directory entry to be freed.\r
 \r
-Returns:\r
-\r
-  None.\r
-\r
---*/\r
+**/\r
+VOID\r
+FatFreeDirEnt (\r
+  IN FAT_DIRENT       *DirEnt\r
+  )\r
 {\r
   if (DirEnt->FileString != NULL) {\r
     FreePool (DirEnt->FileString);\r
@@ -537,25 +443,17 @@ Returns:
   FreePool (DirEnt);\r
 }\r
 \r
-VOID\r
-FatFreeVolume (\r
-  IN FAT_VOLUME       *Volume\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Free volume structure (including the contents of directory cache and disk cache).\r
 \r
-Arguments:\r
-\r
-  Volume                - The volume structure to be freed.\r
+  @param  Volume                - The volume structure to be freed.\r
 \r
-Returns:\r
-\r
-  None.\r
-\r
---*/\r
+**/\r
+VOID\r
+FatFreeVolume (\r
+  IN FAT_VOLUME       *Volume\r
+  )\r
 {\r
   //\r
   // Free disk cache\r
@@ -570,27 +468,19 @@ Returns:
   FreePool (Volume);\r
 }\r
 \r
+/**\r
+\r
+  Translate EFI time to FAT time.\r
+\r
+  @param  ETime                 - The time of EFI_TIME.\r
+  @param  FTime                 - The time of FAT_DATE_TIME.\r
+\r
+**/\r
 VOID\r
 FatEfiTimeToFatTime (\r
   IN  EFI_TIME        *ETime,\r
   OUT FAT_DATE_TIME   *FTime\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Translate EFI time to FAT time.\r
-\r
-Arguments:\r
-\r
-  ETime                 - The time of EFI_TIME.\r
-  FTime                 - The time of FAT_DATE_TIME.\r
-\r
-Returns:\r
-\r
-  None.\r
-\r
---*/\r
 {\r
   //\r
   // ignores timezone info in source ETime\r
@@ -610,27 +500,19 @@ Returns:
   FTime->Time.DoubleSecond  = (UINT16) (ETime->Second / 2);\r
 }\r
 \r
+/**\r
+\r
+  Translate Fat time to EFI time.\r
+\r
+  @param  FTime                 - The time of FAT_DATE_TIME.\r
+  @param  ETime                 - The time of EFI_TIME..\r
+\r
+**/\r
 VOID\r
 FatFatTimeToEfiTime (\r
   IN  FAT_DATE_TIME     *FTime,\r
   OUT EFI_TIME          *ETime\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Translate Fat time to EFI time.\r
-\r
-Arguments:\r
-\r
-  FTime                 - The time of FAT_DATE_TIME.\r
-  ETime                 - The time of EFI_TIME.\r
-\r
-Returns:\r
-\r
-  None.\r
-\r
---*/\r
 {\r
   ETime->Year       = (UINT16) (FTime->Date.Year + 1980);\r
   ETime->Month      = (UINT8) FTime->Date.Month;\r
@@ -643,25 +525,17 @@ Returns:
   ETime->Daylight   = 0;\r
 }\r
 \r
-VOID\r
-FatGetCurrentFatTime (\r
-  OUT FAT_DATE_TIME   *FatNow\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Get Current FAT time.\r
 \r
-Arguments:\r
-\r
-  FatNow                - Current FAT time.\r
-\r
-Returns:\r
+  @param  FatNow                - Current FAT time.\r
 \r
-  None.\r
-\r
---*/\r
+**/\r
+VOID\r
+FatGetCurrentFatTime (\r
+  OUT FAT_DATE_TIME   *FatNow\r
+  )\r
 {\r
   EFI_STATUS Status;\r
   EFI_TIME   Now;\r
@@ -678,26 +552,20 @@ Returns:
   }\r
 }\r
 \r
-BOOLEAN\r
-FatIsValidTime (\r
-  IN EFI_TIME         *Time\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Check whether a time is valid.\r
 \r
-Arguments:\r
-\r
-  Time                  - The time of EFI_TIME.\r
+  @param  Time                  - The time of EFI_TIME.\r
 \r
-Returns:\r
+  @retval TRUE                  - The time is valid.\r
+  @retval FALSE                 - The time is not valid.\r
 \r
-  TRUE                  - The time is valid.\r
-  FALSE                 - The time is not valid.\r
-\r
---*/\r
+**/\r
+BOOLEAN\r
+FatIsValidTime (\r
+  IN EFI_TIME         *Time\r
+  )\r
 {\r
   UINTN         Day;\r
   BOOLEAN       ValidTime;\r
index 1d864d1248c8d30d85560515e337af0a99933c9c..7b273fe1b146a75a5006d8a94496fab3193111ad 100644 (file)
@@ -1,4 +1,5 @@
-/*++\r
+/** @file\r
+  Routines dealing with file open.\r
 \r
 Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials are licensed and made available\r
@@ -9,44 +10,27 @@ 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
 \r
-Module Name:\r
-\r
-  open.c\r
+#include "Fat.h"\r
 \r
-Abstract:\r
+/**\r
 \r
-  Routines dealing with file open\r
+  Create an Open instance for the existing OFile.\r
+  The IFile of the newly opened file is passed out.\r
 \r
-Revision History\r
+  @param  OFile                 - The file that serves as a starting reference point.\r
+  @param  PtrIFile              - The newly generated IFile instance.\r
 \r
---*/\r
-\r
-#include "Fat.h"\r
+  @retval EFI_OUT_OF_RESOURCES  - Can not allocate the memory for the IFile\r
+  @retval EFI_SUCCESS           - Create the new IFile for the OFile successfully\r
 \r
+**/\r
 EFI_STATUS\r
 FatAllocateIFile (\r
   IN FAT_OFILE    *OFile,\r
   OUT FAT_IFILE   **PtrIFile\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Create an Open instance for the existing OFile.\r
-  The IFile of the newly opened file is passed out.\r
-\r
-Arguments:\r
-\r
-  OFile                 - The file that serves as a starting reference point.\r
-  PtrIFile              - The newly generated IFile instance.\r
-\r
-Returns:\r
-\r
-  EFI_OUT_OF_RESOURCES  - Can not allocate the memory for the IFile\r
-  EFI_SUCCESS           - Create the new IFile for the OFile successfully\r
-\r
---*/\r
 {\r
   FAT_IFILE *IFile;\r
 \r
@@ -81,41 +65,36 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
-EFI_STATUS\r
-FatOFileOpen (\r
-  IN  FAT_OFILE            *OFile,\r
-  OUT FAT_IFILE            **NewIFile,\r
-  IN  CHAR16               *FileName,\r
-  IN  UINT64               OpenMode,\r
-  IN  UINT8                Attributes\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Open a file for a file name relative to an existing OFile.\r
   The IFile of the newly opened file is passed out.\r
 \r
-Arguments:\r
-\r
-  OFile                 - The file that serves as a starting reference point.\r
-  NewIFile              - The newly generated IFile instance.\r
-  FileName              - The file name relative to the OFile.\r
-  OpenMode              - Open mode.\r
-  Attributes            - Attributes to set if the file is created.\r
+  @param  OFile                 - The file that serves as a starting reference point.\r
+  @param  NewIFile              - The newly generated IFile instance.\r
+  @param  FileName              - The file name relative to the OFile.\r
+  @param  OpenMode              - Open mode.\r
+  @param  Attributes            - Attributes to set if the file is created.\r
 \r
-Returns:\r
 \r
-  EFI_SUCCESS           - Open the file successfully.\r
-  EFI_INVALID_PARAMETER - The open mode is conflict with the attributes\r
+  @retval EFI_SUCCESS           - Open the file successfully.\r
+  @retval EFI_INVALID_PARAMETER - The open mode is conflict with the attributes\r
                           or the file name is not valid.\r
-  EFI_NOT_FOUND         - Conficts between dir intention and attribute.\r
-  EFI_WRITE_PROTECTED   - Can't open for write if the volume is read only.\r
-  EFI_ACCESS_DENIED     - If the file's attribute is read only, and the\r
+  @retval EFI_NOT_FOUND         - Conficts between dir intention and attribute.\r
+  @retval EFI_WRITE_PROTECTED   - Can't open for write if the volume is read only.\r
+  @retval EFI_ACCESS_DENIED     - If the file's attribute is read only, and the\r
                           open is for read-write fail it.\r
-  EFI_OUT_OF_RESOURCES  - Can not allocate the memory.\r
+  @retval EFI_OUT_OF_RESOURCES  - Can not allocate the memory.\r
 \r
---*/\r
+**/\r
+EFI_STATUS\r
+FatOFileOpen (\r
+  IN  FAT_OFILE            *OFile,\r
+  OUT FAT_IFILE            **NewIFile,\r
+  IN  CHAR16               *FileName,\r
+  IN  UINT64               OpenMode,\r
+  IN  UINT8                Attributes\r
+  )\r
 {\r
   FAT_VOLUME  *Volume;\r
   EFI_STATUS  Status;\r
@@ -199,6 +178,25 @@ Returns:
   return FatOFileFlush (OFile);\r
 }\r
 \r
+/**\r
+\r
+  Implements OpenEx() 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
+  @param  Token                 - A pointer to the token associated with the transaction.:\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
 FatOpenEx (\r
@@ -209,30 +207,6 @@ 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
-  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
-Returns:\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
-\r
---*/\r
 {\r
   FAT_IFILE   *IFile;\r
   FAT_IFILE   *NewIFile;\r
@@ -319,6 +293,25 @@ Returns:
   return Status;\r
 }\r
 \r
+/**\r
+\r
+  Implements Open() of Simple File System Protocol.\r
+\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
+  @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
@@ -328,29 +321,6 @@ FatOpen (
   IN  UINT64              OpenMode,\r
   IN  UINT64              Attributes\r
   )\r
-/*++\r
-Routine Description:\r
-\r
-  Implements Open() of Simple File System Protocol.\r
-\r
-Arguments:\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
-\r
-Returns:\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
-\r
---*/\r
 {\r
   return FatOpenEx (FHand, NewHandle, FileName, OpenMode, Attributes, NULL);\r
 }\r
index 0f43ffae9826d2afc7eca4dab7571fe171ca3b3d..4e12db317eb2d1d6aa566499ea33742cc0029465 100644 (file)
@@ -1,4 +1,5 @@
-/*++\r
+/** @file\r
+  OpenVolume() function of Simple File System Protocol.\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,45 +10,28 @@ 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
 \r
-Module Name:\r
-\r
-  OpenVolume.c\r
+#include "Fat.h"\r
 \r
-Abstract:\r
+/**\r
 \r
-  OpenVolume() function of Simple File System Protocol\r
+  Implements Simple File System Protocol interface function OpenVolume().\r
 \r
-Revision History\r
+  @param  This                  - Calling context.\r
+  @param  File                  - the Root Directory of the volume.\r
 \r
---*/\r
-\r
-#include "Fat.h"\r
+  @retval EFI_OUT_OF_RESOURCES  - Can not allocate the memory.\r
+  @retval EFI_VOLUME_CORRUPTED  - The FAT type is error.\r
+  @retval EFI_SUCCESS           - Open the volume successfully.\r
 \r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 FatOpenVolume (\r
   IN  EFI_SIMPLE_FILE_SYSTEM_PROTOCOL  *This,\r
   OUT EFI_FILE_PROTOCOL                **File\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Implements Simple File System Protocol interface function OpenVolume().\r
-\r
-Arguments:\r
-\r
-  This                  - Calling context.\r
-  File                  - the Root Directory of the volume.\r
-\r
-Returns:\r
-\r
-  EFI_OUT_OF_RESOURCES  - Can not allocate the memory.\r
-  EFI_VOLUME_CORRUPTED  - The FAT type is error.\r
-  EFI_SUCCESS           - Open the volume successfully.\r
-\r
---*/\r
 {\r
   EFI_STATUS  Status;\r
   FAT_VOLUME  *Volume;\r
index 81676cd21550d41695ef7be32f95898b51b6490b..a6e0ec4c139588c587b85c1608936fbac4a9f4d2 100644 (file)
@@ -1,4 +1,5 @@
-/*++\r
+/** @file\r
+  Functions that perform file read/write.\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,44 +11,29 @@ 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
 \r
-  ReadWrite.c\r
+#include "Fat.h"\r
 \r
-Abstract:\r
+/**\r
 \r
-  Functions that perform file read/write\r
+  Get the file's position of the file.\r
 \r
-Revision History\r
 \r
---*/\r
+  @param  FHand                 - The handle of file.\r
+  @param  Position              - The file's position of the file.\r
 \r
-#include "Fat.h"\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
-  FHand                 - The handle of file.\r
-  Position              - The file's position of the file.\r
-\r
-Returns:\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
-\r
---*/\r
 {\r
   FAT_IFILE *IFile;\r
   FAT_OFILE *OFile;\r
@@ -67,30 +53,24 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+\r
+  Set the file's position of the file.\r
+\r
+  @param  FHand                 - The handle of file.\r
+  @param  Position              - The file's position of the file.\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
-Arguments:\r
-\r
-  FHand                 - The handle of file.\r
-  Position              - The file's position of the file.\r
-\r
-Returns:\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
   FAT_IFILE *IFile;\r
   FAT_OFILE *OFile;\r
@@ -130,30 +110,24 @@ Returns:
   return EFI_SUCCESS;\r
 }\r
 \r
+/**\r
+\r
+  Get the file info from the open file of the IFile into Buffer.\r
+\r
+  @param  IFile                 - The instance of the open file.\r
+  @param  BufferSize            - Size of Buffer.\r
+  @param  Buffer                - Buffer containing read data.\r
+\r
+  @retval EFI_SUCCESS           - Get the file info successfully.\r
+  @retval other                 - An error occurred when operation the disk.\r
+\r
+**/\r
 EFI_STATUS\r
 FatIFileReadDir (\r
   IN     FAT_IFILE              *IFile,\r
   IN OUT UINTN                  *BufferSize,\r
      OUT VOID                   *Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Get the file info from the open file of the IFile into Buffer.\r
-\r
-Arguments:\r
-\r
-  IFile                 - The instance of the open file.\r
-  BufferSize            - Size of Buffer.\r
-  Buffer                - Buffer containing read data.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - Get the file info successfully.\r
-  other                 - An error occurred when operation the disk.\r
-\r
---*/\r
 {\r
   EFI_STATUS  Status;\r
   FAT_OFILE   *OFile;\r
@@ -205,6 +179,24 @@ Done:
   return Status;\r
 }\r
 \r
+/**\r
+\r
+  Get the file info from the open file of the IFile into Buffer.\r
+\r
+  @param FHand                 - The file handle to access.\r
+  @param  IoMode                - Indicate whether the access mode is reading or writing.\r
+  @param  BufferSize            - Size of Buffer.\r
+  @param  Buffer                - Buffer containing read data.\r
+  @param  Token                 - A pointer to the token associated with the transaction.\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
+  @retval EFI_WRITE_PROTECTED   - The disk is write protect.\r
+  @retval EFI_ACCESS_DENIED     - The file is read-only.\r
+  @return other                 - An error occurred when operating on the disk.\r
+\r
+**/\r
 EFI_STATUS\r
 FatIFileAccess (\r
   IN     EFI_FILE_PROTOCOL     *FHand,\r
@@ -213,30 +205,6 @@ FatIFileAccess (
   IN OUT VOID                  *Buffer,\r
   IN     EFI_FILE_IO_TOKEN     *Token\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Get the file info from the open file of the IFile into Buffer.\r
-\r
-Arguments:\r
-\r
-  FHand                 - The file handle to access.\r
-  IoMode                - Indicate whether the access mode is reading or writing.\r
-  BufferSize            - Size of Buffer.\r
-  Buffer                - Buffer containing read data.\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
-  EFI_WRITE_PROTECTED   - The disk is write protect.\r
-  EFI_ACCESS_DENIED     - The file is read-only.\r
-  other                 - An error occurred when operating on the disk.\r
-\r
---*/\r
 {\r
   EFI_STATUS  Status;\r
   FAT_IFILE   *IFile;\r
@@ -373,6 +341,21 @@ Done:
   return Status;\r
 }\r
 \r
+/**\r
+\r
+  Get the file info.\r
+\r
+  @param  FHand                 - The handle of the file.\r
+  @param  BufferSize            - Size of Buffer.\r
+  @param  Buffer                - Buffer containing read data.\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
@@ -380,59 +363,50 @@ FatRead (
   IN OUT UINTN              *BufferSize,\r
      OUT VOID               *Buffer\r
   )\r
-/*++\r
+{\r
+  return FatIFileAccess (FHand, ReadData, BufferSize, Buffer, NULL);\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
-  return FatIFileAccess (FHand, ReadData, BufferSize, Buffer, NULL);\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
+  return FatIFileAccess (FHand, ReadData, &Token->BufferSize, Token->Buffer, Token);\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
+  Write the content of buffer into files.\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
-  return FatIFileAccess (FHand, ReadData, &Token->BufferSize, Token->Buffer, Token);\r
-}\r
+  @retval EFI_SUCCESS           - Set the file info successfully.\r
+  @retval EFI_WRITE_PROTECTED   - The disk is write protect.\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
@@ -440,62 +414,49 @@ FatWrite (
   IN OUT UINTN              *BufferSize,\r
   IN     VOID               *Buffer\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Write the content of buffer into files.\r
+{\r
+  return FatIFileAccess (FHand, WriteData, BufferSize, Buffer, NULL);\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 protect.\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
-  return FatIFileAccess (FHand, WriteData, BufferSize, Buffer, NULL);\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
+  return FatIFileAccess (FHand, WriteData, &Token->BufferSize, Token->Buffer, Token);\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
+  This function reads data from a file or writes data to a file.\r
+  It uses OFile->PosRem to determine how much data can be accessed in one time.\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  OFile                 - The open file.\r
+  @param  IoMode                - Indicate whether the access mode is reading or writing.\r
+  @param  Position              - The position where data will be accessed.\r
+  @param  DataBufferSize        - Size of Buffer.\r
+  @param  UserBuffer            - Buffer containing data.\r
+  @param  Task                    point to task instance.\r
 \r
---*/\r
-{\r
-  return FatIFileAccess (FHand, WriteData, &Token->BufferSize, Token->Buffer, Token);\r
-}\r
+  @retval EFI_SUCCESS           - Access the data successfully.\r
+  @return other                 - An error occurred when operating on the disk.\r
 \r
+**/\r
 EFI_STATUS\r
 FatAccessOFile (\r
   IN     FAT_OFILE      *OFile,\r
@@ -505,27 +466,6 @@ FatAccessOFile (
   IN OUT UINT8          *UserBuffer,\r
   IN FAT_TASK           *Task\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  This function reads data from a file or writes data to a file.\r
-  It uses OFile->PosRem to determine how much data can be accessed in one time.\r
-\r
-Arguments:\r
-\r
-  OFile                 - The open file.\r
-  IoMode                - Indicate whether the access mode is reading or writing.\r
-  Position              - The position where data will be accessed.\r
-  DataBufferSize        - Size of Buffer.\r
-  UserBuffer            - Buffer containing data.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS           - Access the data successfully.\r
-  other                 - An error occurred when operating on the disk.\r
-\r
---*/\r
 {\r
   FAT_VOLUME  *Volume;\r
   UINTN       Len;\r
@@ -579,28 +519,22 @@ Returns:
   return Status;\r
 }\r
 \r
-EFI_STATUS\r
-FatExpandOFile (\r
-  IN FAT_OFILE          *OFile,\r
-  IN UINT64             ExpandedSize\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Expand OFile by appending zero bytes at the end of OFile.\r
 \r
-Arguments:\r
-\r
-  OFile                 - The open file.\r
-  ExpandedSize          - The number of zero bytes appended at the end of the file.\r
+  @param  OFile                 - The open file.\r
+  @param  ExpandedSize          - The number of zero bytes appended at the end of the file.\r
 \r
-Returns:\r
+  @retval EFI_SUCCESS           - The file is expanded successfully.\r
+  @return other                 - An error occurred when expanding file.\r
 \r
-  EFI_SUCCESS           - The file is expanded successfully.\r
-  other                 - An error occurred when expanding file.\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+FatExpandOFile (\r
+  IN FAT_OFILE          *OFile,\r
+  IN UINT64             ExpandedSize\r
+  )\r
 {\r
   EFI_STATUS  Status;\r
   UINTN       WritePos;\r
@@ -614,29 +548,23 @@ Returns:
   return Status;\r
 }\r
 \r
-EFI_STATUS\r
-FatWriteZeroPool (\r
-  IN FAT_OFILE  *OFile,\r
-  IN UINTN      WritePos\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Write zero pool from the WritePos to the end of OFile.\r
 \r
-Arguments:\r
-\r
-  OFile                 - The open file to write zero pool.\r
-  WritePos              - The number of zero bytes written.\r
-\r
-Returns:\r
+  @param  OFile                 - The open file to write zero pool.\r
+  @param  WritePos              - The number of zero bytes written.\r
 \r
-  EFI_SUCCESS           - Write the zero pool successfully.\r
-  EFI_OUT_OF_RESOURCES  - Not enough memory to perform the operation.\r
-  other                 - An error occurred when writing disk.\r
+  @retval EFI_SUCCESS           - Write the zero pool successfully.\r
+  @retval EFI_OUT_OF_RESOURCES  - Not enough memory to perform the operation.\r
+  @return other                 - An error occurred when writing disk.\r
 \r
---*/\r
+**/\r
+EFI_STATUS\r
+FatWriteZeroPool (\r
+  IN FAT_OFILE  *OFile,\r
+  IN UINTN      WritePos\r
+  )\r
 {\r
   EFI_STATUS  Status;\r
   VOID        *ZeroBuffer;\r
@@ -676,28 +604,22 @@ Returns:
   return Status;\r
 }\r
 \r
-EFI_STATUS\r
-FatTruncateOFile (\r
-  IN FAT_OFILE          *OFile,\r
-  IN UINTN              TruncatedSize\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
 \r
   Truncate the OFile to smaller file size.\r
 \r
-Arguments:\r
-\r
-  OFile                 - The open file.\r
-  TruncatedSize         - The new file size.\r
+  @param  OFile                 - The open file.\r
+  @param  TruncatedSize         - The new file size.\r
 \r
-Returns:\r
+  @retval EFI_SUCCESS           - The file is truncated successfully.\r
+  @return other                 - An error occurred when truncating file.\r
 \r
-  EFI_SUCCESS           - The file is truncated successfully.\r
-  other                 - An error occurred when truncating file.\r
-\r
---*/\r
+**/\r
+EFI_STATUS\r
+FatTruncateOFile (\r
+  IN FAT_OFILE          *OFile,\r
+  IN UINTN              TruncatedSize\r
+  )\r
 {\r
   OFile->FileSize = TruncatedSize;\r
   return FatShrinkEof (OFile);\r
index 61b9aab4d93a66296001cd0b2bd175490c826f60..b240a931ff4d1bc1a00269171302ef5ade5b4fea 100644 (file)
@@ -189,9 +189,8 @@ FatStriCmp (
 /**\r
   Uppercase a string.\r
 \r
-  @param  Str                   The string which will be upper-cased.\r
+  @param  String                   The string which will be upper-cased.\r
 \r
-  @return None.\r
 \r
 **/\r
 VOID\r
@@ -209,9 +208,8 @@ FatStrUpr (
 /**\r
   Lowercase a string\r
 \r
-  @param  Str                   The string which will be lower-cased.\r
+  @param  String                   The string which will be lower-cased.\r
 \r
-  @return None\r
 \r
 **/\r
 VOID\r