//\r
// FFS helper functions\r
//\r
-\r
-\r
/**\r
given the supplied FW_VOL_BLOCK_PROTOCOL, allocate a buffer for output and\r
copy the volume header into it.\r
\r
@param FvDevice pointer to the FvDevice to be freed. \r
\r
- @return None.\r
-\r
**/\r
VOID\r
FreeFvDeviceResource (\r
\r
CoreFreePool (FfsFileEntry);\r
\r
- FfsFileEntry = (FFS_FILE_LIST_ENTRY *)NextEntry;\r
+ FfsFileEntry = (FFS_FILE_LIST_ENTRY *) NextEntry;\r
}\r
\r
\r
\r
\r
/**\r
- Check if a FV is consistent and allocate cache\r
+ Check if an FV is consistent and allocate cache for it.\r
\r
- @param FvDevice pointer to the FvDevice to be checked. \r
+ @param FvDevice A pointer to the FvDevice to be checked. \r
\r
@retval EFI_OUT_OF_RESOURCES No enough buffer could be allocated. \r
@retval EFI_SUCCESS FV is consistent and cache is allocated. \r
Size -= LbaOffset;\r
}\r
Status = Fvb->Read (Fvb,\r
- LbaIndex,\r
- LbaOffset,\r
- &Size,\r
- CacheLocation\r
- );\r
+ LbaIndex,\r
+ LbaOffset,\r
+ &Size,\r
+ CacheLocation\r
+ );\r
//\r
// Not check EFI_BAD_BUFFER_SIZE, for Size = BlockMap->Length\r
//\r
//\r
// Build FFS list\r
//\r
- FfsHeader = (EFI_FFS_FILE_HEADER *)FvDevice->CachedFv;\r
+ FfsHeader = (EFI_FFS_FILE_HEADER *) FvDevice->CachedFv;\r
TopFvAddress = FvDevice->EndOfCachedFv;\r
- while ((UINT8 *)FfsHeader < TopFvAddress) {\r
+ while ((UINT8 *) FfsHeader < TopFvAddress) {\r
\r
- TestLength = TopFvAddress - ((UINT8 *)FfsHeader);\r
+ TestLength = TopFvAddress - ((UINT8 *) FfsHeader);\r
if (TestLength > sizeof (EFI_FFS_FILE_HEADER)) {\r
TestLength = sizeof (EFI_FFS_FILE_HEADER);\r
}\r
if ((FileState == EFI_FILE_HEADER_INVALID) || \r
(FileState == EFI_FILE_HEADER_CONSTRUCTION)) {\r
FfsHeader++;\r
- \r
continue;\r
- \r
} else {\r
//\r
// File system is corrputed\r
return;\r
}\r
\r
- FvDevice->Fvb = Fvb;\r
- FvDevice->Handle = Handle;\r
- FvDevice->FwVolHeader = FwVolHeader;\r
+ FvDevice->Fvb = Fvb;\r
+ FvDevice->Handle = Handle;\r
+ FvDevice->FwVolHeader = FwVolHeader;\r
FvDevice->Fv.ParentHandle = Fvb->ParentHandle;\r
\r
//\r