/** @file\r
FAT recovery PEIM entry point, Ppi Functions and FAT Api functions.\r
\r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
\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
//\r
// Construct root directory file\r
//\r
+ ZeroMem (&Parent, sizeof (PEI_FAT_FILE));\r
Parent.IsFixedRootDir = (BOOLEAN) ((PrivateData->Volume[VolumeIndex].FatType == Fat32) ? FALSE : TRUE);\r
Parent.Attributes = FAT_ATTR_DIRECTORY;\r
Parent.CurrentPos = 0;\r
//\r
Status = FatReadNextDirectoryEntry (PrivateData, &Parent, File);\r
while (Status == EFI_SUCCESS) {\r
+ //\r
+ // Compare whether the file name is recovery file name.\r
+ //\r
if (EngStriColl (PrivateData, FileName, File->FileName)) {\r
break;\r
}\r
return EFI_NOT_FOUND;\r
}\r
\r
+ //\r
+ // Get the recovery file, set its file position to 0.\r
+ //\r
+ if (File->StartingCluster != 0) {\r
+ Status = FatSetFilePos (PrivateData, File, 0);\r
+ }\r
+\r
*Handle = File;\r
\r
return EFI_SUCCESS;\r