Author: hbelusca
Date: Sun Oct 28 12:33:23 2012
New Revision: 57637
URL:
http://svn.reactos.org/svn/reactos?rev=57637&view=rev
Log:
Synchronize with trunk's revision r57636.
Modified:
branches/ros-csrss/boot/freeldr/freeldr/fs/fat.c
Modified: branches/ros-csrss/boot/freeldr/freeldr/fs/fat.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-csrss/boot/freeldr/freeldr/…
==============================================================================
--- branches/ros-csrss/boot/freeldr/freeldr/fs/fat.c [iso-8859-1] (original)
+++ branches/ros-csrss/boot/freeldr/freeldr/fs/fat.c [iso-8859-1] Sun Oct 28 12:33:23
2012
@@ -906,16 +906,16 @@
UINT32 ThisFatEntOffset;
ULONG SectorCount;
PUCHAR ReadBuffer;
- BOOLEAN status = TRUE;;
+ BOOLEAN status = TRUE;
//TRACE("FatGetFatEntry() Retrieving FAT entry for cluster %d.\n", Cluster);
- // We need a buffer for 2 secors
- ReadBuffer = HeapAllocate(FrLdrTempHeap, 2 * Volume->BytesPerSector,
'xTAF');
- if (!ReadBuffer)
- {
- return FALSE;
- }
+ // We need a buffer for 2 secors
+ ReadBuffer = HeapAllocate(FrLdrTempHeap, 2 * Volume->BytesPerSector,
'xTAF');
+ if (!ReadBuffer)
+ {
+ return FALSE;
+ }
switch(Volume->FatType)
{
@@ -929,7 +929,6 @@
TRACE("ThisFatSecNum: %d\n", ThisFatSecNum);
TRACE("ThisFatEntOffset: %d\n", ThisFatEntOffset);
-
if (ThisFatEntOffset == (Volume->BytesPerSector - 1))
{
SectorCount = 2;
@@ -939,11 +938,11 @@
SectorCount = 1;
}
- if (!FatReadVolumeSectors(Volume, ThisFatSecNum, SectorCount, ReadBuffer))
- {
- status = FALSE;
- break;
- }
+ if (!FatReadVolumeSectors(Volume, ThisFatSecNum, SectorCount, ReadBuffer))
+ {
+ status = FALSE;
+ break;
+ }
fat = *((USHORT *) (ReadBuffer + ThisFatEntOffset));
fat = SWAPW(fat);
@@ -963,8 +962,8 @@
if (!FatReadVolumeSectors(Volume, ThisFatSecNum, 1, ReadBuffer))
{
- status = FALSE;
- break;
+ status = FALSE;
+ break;
}
fat = *((USHORT *) (ReadBuffer + ThisFatEntOffset));
@@ -992,17 +991,17 @@
default:
ERR("Unknown FAT type %d\n", Volume->FatType);
- status = FALSE;
- break;
+ status = FALSE;
+ break;
}
//TRACE("FAT entry is 0x%x.\n", fat);
- HeapFree(FrLdrTempHeap, ReadBuffer, 'xTAF');
+ HeapFree(FrLdrTempHeap, ReadBuffer, 'xTAF');
*ClusterPointer = fat;
- return TRUE;
+ return status;
}
ULONG FatCountClustersInChain(PFAT_VOLUME_INFO Volume, ULONG StartCluster)