]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Dxe/FwVol/FwVolAttrib.c
Refine code to make it more safely.
[mirror_edk2.git] / MdeModulePkg / Core / Dxe / FwVol / FwVolAttrib.c
index 1b629ddf1f78cc6dc66f58bd85e38a03f0340ea8..0a89e707613eee8caa488df75ccee7115d002830 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
   Implements get/set firmware volume attributes\r
 \r
-Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2006 - 2012, 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
@@ -12,7 +12,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
+#include "FwVolDriver.h"\r
 \r
 \r
 /**\r
@@ -35,18 +36,11 @@ FvGetVolumeAttributes (
   EFI_STATUS                                Status;\r
   FV_DEVICE                                 *FvDevice;\r
   EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL        *Fvb;\r
-  EFI_FVB_ATTRIBUTES                        FvbAttributes;\r
+  EFI_FVB_ATTRIBUTES_2                      FvbAttributes;\r
 \r
   FvDevice = FV_DEVICE_FROM_THIS (This);\r
   Fvb = FvDevice->Fvb;\r
 \r
-  if (FvDevice->CachedFv == NULL) {\r
-    Status = FvCheck (FvDevice);\r
-    if (EFI_ERROR (Status)) {\r
-      return Status;\r
-    }\r
-  }\r
-\r
   //\r
   // First get the Firmware Volume Block Attributes\r
   //\r