mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Fixed a bug in FAT12FindAvailableCluster.
svn path=/trunk/; revision=2385
This commit is contained in:
parent
c900b97902
commit
94048a055d
1 changed files with 4 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* $Id: fat.c,v 1.34 2001/11/02 22:35:31 hbirr Exp $
|
* $Id: fat.c,v 1.35 2001/11/20 23:40:26 hbirr Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -208,7 +208,7 @@ FAT12FindAvailableCluster(PDEVICE_EXTENSION DeviceExt, PULONG Cluster)
|
||||||
PVOID Context;
|
PVOID Context;
|
||||||
LARGE_INTEGER Offset;
|
LARGE_INTEGER Offset;
|
||||||
|
|
||||||
FatLength = DeviceExt->NumberOfClusters * 2;
|
FatLength = DeviceExt->NumberOfClusters;
|
||||||
*Cluster = 0;
|
*Cluster = 0;
|
||||||
StartCluster = DeviceExt->LastAvailableCluster;
|
StartCluster = DeviceExt->LastAvailableCluster;
|
||||||
Offset.QuadPart = 0;
|
Offset.QuadPart = 0;
|
||||||
|
@ -221,7 +221,7 @@ FAT12FindAvailableCluster(PDEVICE_EXTENSION DeviceExt, PULONG Cluster)
|
||||||
|
|
||||||
for (j = 0; j < 2; j++)
|
for (j = 0; j < 2; j++)
|
||||||
{
|
{
|
||||||
for (i = StartCluster * 2; i < FatLength; i++)
|
for (i = StartCluster; i < FatLength; i++)
|
||||||
{
|
{
|
||||||
FATOffset = (i * 12) / 8;
|
FATOffset = (i * 12) / 8;
|
||||||
if ((i % 2) == 0)
|
if ((i % 2) == 0)
|
||||||
|
@ -242,7 +242,7 @@ FAT12FindAvailableCluster(PDEVICE_EXTENSION DeviceExt, PULONG Cluster)
|
||||||
return(STATUS_SUCCESS);
|
return(STATUS_SUCCESS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FatLength = StartCluster * 2;
|
FatLength = StartCluster;
|
||||||
StartCluster = 2;
|
StartCluster = 2;
|
||||||
}
|
}
|
||||||
CcUnpinData(Context);
|
CcUnpinData(Context);
|
||||||
|
|
Loading…
Reference in a new issue