diff options
author | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-07-18 09:50:09 +0000 |
---|---|---|
committer | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-07-18 09:50:09 +0000 |
commit | e94a9ff7271367e649ee4f9a86da1f1bea6d112e (patch) | |
tree | bcf3077b88cb89d1e7127285b6c54d9658f67287 /MdeModulePkg/Core/Dxe/FwVol/FwVol.c | |
parent | ff61847ddc91285a9ef8be00b89304870c493ef8 (diff) | |
download | edk2-platforms-e94a9ff7271367e649ee4f9a86da1f1bea6d112e.tar.xz |
Code scrub for DxeCore
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5520 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Core/Dxe/FwVol/FwVol.c')
-rw-r--r-- | MdeModulePkg/Core/Dxe/FwVol/FwVol.c | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/MdeModulePkg/Core/Dxe/FwVol/FwVol.c b/MdeModulePkg/Core/Dxe/FwVol/FwVol.c index 6a4d7b05b2..f14cce05c7 100644 --- a/MdeModulePkg/Core/Dxe/FwVol/FwVol.c +++ b/MdeModulePkg/Core/Dxe/FwVol/FwVol.c @@ -52,8 +52,6 @@ FV_DEVICE mFvDevice = { //
// FFS helper functions
//
-
-
/**
given the supplied FW_VOL_BLOCK_PROTOCOL, allocate a buffer for output and
copy the volume header into it.
@@ -122,8 +120,6 @@ GetFwVolHeader ( @param FvDevice pointer to the FvDevice to be freed.
- @return None.
-
**/
VOID
FreeFvDeviceResource (
@@ -149,7 +145,7 @@ FreeFvDeviceResource ( CoreFreePool (FfsFileEntry);
- FfsFileEntry = (FFS_FILE_LIST_ENTRY *)NextEntry;
+ FfsFileEntry = (FFS_FILE_LIST_ENTRY *) NextEntry;
}
@@ -169,9 +165,9 @@ FreeFvDeviceResource ( /**
- Check if a FV is consistent and allocate cache
+ Check if an FV is consistent and allocate cache for it.
- @param FvDevice pointer to the FvDevice to be checked.
+ @param FvDevice A pointer to the FvDevice to be checked.
@retval EFI_OUT_OF_RESOURCES No enough buffer could be allocated.
@retval EFI_SUCCESS FV is consistent and cache is allocated.
@@ -245,11 +241,11 @@ FvCheck ( Size -= LbaOffset;
}
Status = Fvb->Read (Fvb,
- LbaIndex,
- LbaOffset,
- &Size,
- CacheLocation
- );
+ LbaIndex,
+ LbaOffset,
+ &Size,
+ CacheLocation
+ );
//
// Not check EFI_BAD_BUFFER_SIZE, for Size = BlockMap->Length
//
@@ -288,11 +284,11 @@ FvCheck ( //
// Build FFS list
//
- FfsHeader = (EFI_FFS_FILE_HEADER *)FvDevice->CachedFv;
+ FfsHeader = (EFI_FFS_FILE_HEADER *) FvDevice->CachedFv;
TopFvAddress = FvDevice->EndOfCachedFv;
- while ((UINT8 *)FfsHeader < TopFvAddress) {
+ while ((UINT8 *) FfsHeader < TopFvAddress) {
- TestLength = TopFvAddress - ((UINT8 *)FfsHeader);
+ TestLength = TopFvAddress - ((UINT8 *) FfsHeader);
if (TestLength > sizeof (EFI_FFS_FILE_HEADER)) {
TestLength = sizeof (EFI_FFS_FILE_HEADER);
}
@@ -308,9 +304,7 @@ FvCheck ( if ((FileState == EFI_FILE_HEADER_INVALID) ||
(FileState == EFI_FILE_HEADER_CONSTRUCTION)) {
FfsHeader++;
-
continue;
-
} else {
//
// File system is corrputed
@@ -476,9 +470,9 @@ NotifyFwVolBlock ( return;
}
- FvDevice->Fvb = Fvb;
- FvDevice->Handle = Handle;
- FvDevice->FwVolHeader = FwVolHeader;
+ FvDevice->Fvb = Fvb;
+ FvDevice->Handle = Handle;
+ FvDevice->FwVolHeader = FwVolHeader;
FvDevice->Fv.ParentHandle = Fvb->ParentHandle;
//
|