From 6e97490ee0a45d46384eda08a58cccd583166329 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Thu, 16 Jun 2011 13:07:08 +0000 Subject: [PATCH] [VFATLIB] - Fix default cluster size for floppy disks svn path=/trunk/; revision=52275 --- reactos/lib/fslib/vfatlib/fat12.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/reactos/lib/fslib/vfatlib/fat12.c b/reactos/lib/fslib/vfatlib/fat12.c index 58725223777..4b7ac32ad18 100644 --- a/reactos/lib/fslib/vfatlib/fat12.c +++ b/reactos/lib/fslib/vfatlib/fat12.c @@ -289,8 +289,16 @@ Fat12Format(IN HANDLE FileHandle, /* Calculate cluster size */ if (ClusterSize == 0) { - /* 4KB Cluster (Harddisk only) */ - ClusterSize = 4096; + if (DiskGeometry.MediaType == FixedMedia) + { + /* 4KB Cluster (Harddisk only) */ + ClusterSize = 4096; + } + else + { + /* 512 byte cluster (floppy) */ + ClusterSize = 512; + } } SectorCount = PartitionInfo->PartitionLength.QuadPart >>