From: Pierre Schweitzer Date: Sat, 13 Feb 2016 09:16:45 +0000 (+0000) Subject: [EXT2] X-Git-Tag: ReactOS-0.4.1~489 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=f79fbfbb61a69b7b0dae11e4a7d035e7803ec699;hp=d6607c45f884d4729024632a69bb6a6b9ff1cea7 [EXT2] Add the ReactOS famous... hack? fix? whatever? already present in FastFAT, NTFS...: When accessing a floppy disk, our floppy storage stack can return that the disk type is unknown (some would say it's legit - see comments in FastFAT) and will also return a disk sector size of 0. Then, when trying to read the floppy disk with said size, everything goes wrong (null length read is never a good thing). So, as in any other FSD in ReactOS, for disk sector size to 512 bytes in this really specific case. This fixes BSOD when having a floppy drive in ReactOS (whatever its filesystem). CORE-10464 #resolve #comment Fixed with r70725 svn path=/trunk/; revision=70725 --- diff --git a/reactos/drivers/filesystems/ext2/src/fsctl.c b/reactos/drivers/filesystems/ext2/src/fsctl.c index 124b73930d3..d6cb8d71176 100644 --- a/reactos/drivers/filesystems/ext2/src/fsctl.c +++ b/reactos/drivers/filesystems/ext2/src/fsctl.c @@ -1496,6 +1496,13 @@ Ext2MountVolume (IN PEXT2_IRP_CONTEXT IrpContext) _SEH2_LEAVE; } +#ifdef __REACTOS__ + if (DiskGeometry.MediaType == Unknown) + { + DiskGeometry.BytesPerSector = 512; + } +#endif + Status = IoCreateDevice( MainDeviceObject->DriverObject, sizeof(EXT2_VCB),