mirror of
https://github.com/reactos/reactos.git
synced 2025-06-12 05:38:31 +00:00
[VFATLIB]
- Fix default cluster size for floppy disks svn path=/trunk/; revision=52275
This commit is contained in:
parent
6220537b5f
commit
6e97490ee0
1 changed files with 10 additions and 2 deletions
|
@ -288,10 +288,18 @@ Fat12Format(IN HANDLE FileHandle,
|
||||||
|
|
||||||
/* Calculate cluster size */
|
/* Calculate cluster size */
|
||||||
if (ClusterSize == 0)
|
if (ClusterSize == 0)
|
||||||
|
{
|
||||||
|
if (DiskGeometry.MediaType == FixedMedia)
|
||||||
{
|
{
|
||||||
/* 4KB Cluster (Harddisk only) */
|
/* 4KB Cluster (Harddisk only) */
|
||||||
ClusterSize = 4096;
|
ClusterSize = 4096;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* 512 byte cluster (floppy) */
|
||||||
|
ClusterSize = 512;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SectorCount = PartitionInfo->PartitionLength.QuadPart >>
|
SectorCount = PartitionInfo->PartitionLength.QuadPart >>
|
||||||
GetShiftCount(DiskGeometry->BytesPerSector); /* Use shifting to avoid 64-bit division */
|
GetShiftCount(DiskGeometry->BytesPerSector); /* Use shifting to avoid 64-bit division */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue