]> git.proxmox.com Git - mirror_edk2.git/blobdiff - FatPkg/EnhancedFatDxe/Delete.c
MdeModulePkg/FaultTolerantWriteDxe: implement standalone MM version
[mirror_edk2.git] / FatPkg / EnhancedFatDxe / Delete.c
index f39913ec0025e09158e47775c0d14b227a22e381..9837565a8ef8f11c8d211aeb72ff64c18d17dbb0 100644 (file)
@@ -1,6 +1,7 @@
-/*++\r
+/** @file\r
+  Function that deletes a file.\r
 \r
-Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2013, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials are licensed and made available\r
 under the terms and conditions of the BSD License which accompanies this\r
 distribution. The full text of the license may be found at\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
@@ -55,6 +40,8 @@ Returns:
   IFile = IFILE_FROM_FHAND (FHand);\r
   OFile = IFile->OFile;\r
 \r
+  FatWaitNonblockingTask (IFile);\r
+\r
   //\r
   // Lock the volume\r
   //\r
@@ -127,7 +114,7 @@ Done:
   //\r
   // Done\r
   //\r
-  Status = FatCleanupVolume (OFile->Volume, NULL, Status);\r
+  Status = FatCleanupVolume (OFile->Volume, NULL, Status, NULL);\r
   FatReleaseLock ();\r
 \r
   if (EFI_ERROR (Status)) {\r