]> git.proxmox.com Git - mirror_edk2.git/blobdiff - FatPkg/EnhancedFatDxe/Info.c
MdeModulePkg/UefiBootManagerLib: Refine the debug message
[mirror_edk2.git] / FatPkg / EnhancedFatDxe / Info.c
index cd8869acbc1ef2951472375901e932d26786a150..858b3f4a3e00a12b8a48ac7aff7f42f3e0ce4f88 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2015, 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
@@ -515,6 +515,8 @@ Returns:
     return EFI_DEVICE_ERROR;\r
   }\r
 \r
+  FatWaitNonblockingTask (IFile);\r
+\r
   FatAcquireLock ();\r
 \r
   //\r
@@ -526,20 +528,16 @@ Returns:
     //\r
     Status = EFI_UNSUPPORTED;\r
     if (IsSet) {\r
-      if (Volume->ReadOnly) {\r
-        Status = EFI_WRITE_PROTECTED;\r
-      } else {\r
-        if (CompareGuid (Type, &gEfiFileInfoGuid)) {\r
-          Status = FatSetFileInfo (Volume, IFile, OFile, *BufferSize, Buffer);\r
-        }\r
+      if (CompareGuid (Type, &gEfiFileInfoGuid)) {\r
+        Status = Volume->ReadOnly ? EFI_WRITE_PROTECTED : FatSetFileInfo (Volume, IFile, OFile, *BufferSize, Buffer);\r
+      }\r
 \r
-        if (CompareGuid (Type, &gEfiFileSystemInfoGuid)) {\r
-          Status = FatSetVolumeInfo (Volume, *BufferSize, Buffer);\r
-        }\r
+      if (CompareGuid (Type, &gEfiFileSystemInfoGuid)) {\r
+        Status = Volume->ReadOnly ? EFI_WRITE_PROTECTED : FatSetVolumeInfo (Volume, *BufferSize, Buffer);\r
+      }\r
 \r
-        if (CompareGuid (Type, &gEfiFileSystemVolumeLabelInfoIdGuid)) {\r
-          Status = FatSetVolumeLabelInfo (Volume, *BufferSize, Buffer);\r
-        }\r
+      if (CompareGuid (Type, &gEfiFileSystemVolumeLabelInfoIdGuid)) {\r
+        Status = Volume->ReadOnly ? EFI_WRITE_PROTECTED : FatSetVolumeLabelInfo (Volume, *BufferSize, Buffer);\r
       }\r
     } else {\r
       if (CompareGuid (Type, &gEfiFileInfoGuid)) {\r
@@ -556,7 +554,7 @@ Returns:
     }\r
   }\r
 \r
-  Status = FatCleanupVolume (Volume, NULL, Status);\r
+  Status = FatCleanupVolume (Volume, NULL, Status, NULL);\r
 \r
   FatReleaseLock ();\r
   return Status;\r