/*++\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
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
//\r
VOID\r
FileClose (\r
- IN EFI_FILE *File\r
+ IN EFI_FILE_PROTOCOL *File\r
)\r
{\r
EFI_STATUS Status;\r
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
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
ASSERT_EFI_ERROR (Status);\r
ZeroMem (Dev, sizeof(VS_DEV));\r
\r
- Dev->Signature = VARIABLE_STORE_SIGNATURE;\r
+ Dev->Signature = VS_DEV_SIGNATURE;\r
Dev->Size = Size;\r
VAR_DATA_PTR (Dev) = (UINT8 *) (UINTN) NvStorageBase;\r
VAR_FILE_VOLUMEID (Dev) = VolumeId;\r
{\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
{\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
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