]> git.proxmox.com Git - mirror_edk2.git/blobdiff - DuetPkg/FSVariable/FileStorage.c
The definition of NumberOfSmmReservedRegions is incorrect in Framework SmmCis specifi...
[mirror_edk2.git] / DuetPkg / FSVariable / FileStorage.c
index 400f9ffaab9a0f2c34c89a33746d1d0d5476524d..4bf0a89d7488d2547e1f875ae1b1bbd03f8dc511 100644 (file)
@@ -1,7 +1,7 @@
 /*++\r
 \r
-Copyright (c) 2006 - 2007, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2006 - 2010, 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
@@ -55,7 +55,7 @@ OpenStore (
   IN  EFI_DEVICE_PATH_PROTOCOL  *Device,\r
   IN  CHAR16                    *FilePathName,\r
   IN  UINT64                    OpenMode,\r
-  OUT EFI_FILE                  **File\r
+  OUT EFI_FILE_PROTOCOL         **File\r
   );\r
 \r
 //\r
@@ -63,7 +63,7 @@ OpenStore (
 //\r
 VOID\r
 FileClose (\r
-  IN  EFI_FILE                   *File\r
+  IN  EFI_FILE_PROTOCOL          *File\r
   )\r
 {\r
   EFI_STATUS Status;\r
@@ -180,7 +180,7 @@ OnSimpleFileSystemInstall (
   EFI_HANDLE                Handle;\r
   EFI_DEVICE_PATH_PROTOCOL  *Device;\r
   VS_DEV                    *Dev;\r
-  EFI_FILE                  *File;\r
+  EFI_FILE_PROTOCOL         *File;\r
   UINTN                     NumBytes;\r
 \r
   Dev = (VS_DEV *) Context;\r
@@ -223,9 +223,7 @@ OnSimpleFileSystemInstall (
   NumBytes = Dev->Size;\r
   Status = File->Write (File, &NumBytes, VAR_DATA_PTR (Dev));\r
   ASSERT_EFI_ERROR (Status);\r
-  // KEN: bugbug here if closing file, volume handle will be free,\r
-  // and system will be hang when accessing volume handle in future.\r
-  //FileClose (File);\r
+  FileClose (File);\r
   DEBUG ((EFI_D_ERROR, "FileStorage: Mapped to file!\n"));\r
 }\r
 \r
@@ -288,7 +286,7 @@ FileEraseStore(
 {\r
   EFI_STATUS              Status;\r
   VS_DEV                  *Dev;\r
-  EFI_FILE                *File;\r
+  EFI_FILE_PROTOCOL       *File;\r
   UINTN                   NumBytes;\r
 \r
   Status = EFI_SUCCESS;\r
@@ -324,7 +322,7 @@ FileWriteStore (
 {\r
   EFI_STATUS              Status;\r
   VS_DEV                  *Dev;\r
-  EFI_FILE                *File;\r
+  EFI_FILE_PROTOCOL       *File;\r
 \r
   Status = EFI_SUCCESS;\r
   Dev    = DEV_FROM_THIS(This);\r
@@ -371,7 +369,7 @@ OpenStore (
   IN  EFI_DEVICE_PATH_PROTOCOL  *Device,\r
   IN  CHAR16                    *FilePathName,\r
   IN  UINT64                    OpenMode,\r
-  OUT EFI_FILE                  **File\r
+  OUT EFI_FILE_PROTOCOL         **File\r
   )\r
 {\r
   EFI_HANDLE                        Handle;\r