]> git.proxmox.com Git - mirror_edk2.git/blobdiff - FatPkg/EnhancedFatDxe/Flush.c
FatPkg/EnhancedFatDxe: Make the comments align with EDKIIcoding style
[mirror_edk2.git] / FatPkg / EnhancedFatDxe / Flush.c
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