]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Variable/RuntimeDxe/Reclaim.c
Update the copyright notice format
[mirror_edk2.git] / MdeModulePkg / Universal / Variable / RuntimeDxe / Reclaim.c
index 9c351a3547e748b1178bb71f4c5aae60bbd5065b..79962daa6484f603cc0ef49dd05dd697d7aaf7b4 100644 (file)
@@ -3,8 +3,8 @@
   Handles non-volatile variable store garbage collection, using FTW\r
   (Fault Tolerant Write) protocol.\r
 \r
-Copyright (c) 2006 - 2008, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
@@ -44,6 +44,7 @@ GetFvbHandleByAddress (
   EFI_PHYSICAL_ADDRESS                FvbBaseAddress;\r
   EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL  *Fvb;\r
   EFI_FIRMWARE_VOLUME_HEADER          *FwVolHeader;\r
+  EFI_FVB_ATTRIBUTES_2                Attributes;\r
 \r
   *FvbHandle = NULL;\r
   //\r
@@ -72,6 +73,11 @@ GetFvbHandleByAddress (
       Status = EFI_NOT_FOUND;\r
       break;\r
     }\r
+\r
+    Status = Fvb->GetAttributes (Fvb, &Attributes);\r
+    if (EFI_ERROR (Status) || ((Attributes & EFI_FVB2_WRITE_STATUS) == 0)) {\r
+      continue;     \r
+    }\r
     //\r
     // Compare the address and select the right one\r
     //\r