From 057f42a55429af11ccb2558b50ac3f6ac9031fe7 Mon Sep 17 00:00:00 2001 From: Rafal Harabien Date: Wed, 20 Apr 2011 17:44:12 +0000 Subject: [PATCH] [FLOPPY] Increase floppy drives count in global ConfigurationInformation. Fixes not working floppies in explorer. See issue #4236 for more details. svn path=/trunk/; revision=51409 --- reactos/drivers/storage/floppy/floppy.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/reactos/drivers/storage/floppy/floppy.c b/reactos/drivers/storage/floppy/floppy.c index 05d15983fe9..f8c8ab1c34c 100644 --- a/reactos/drivers/storage/floppy/floppy.c +++ b/reactos/drivers/storage/floppy/floppy.c @@ -971,22 +971,25 @@ static BOOLEAN NTAPI AddControllers(PDRIVER_OBJECT DriverObject) continue; /* continue to next drive */ } - /* 3e: Set up the DPC */ + /* 3e: Increase global floppy drives count */ + IoGetConfigurationInformation()->FloppyCount++; + + /* 3f: Set up the DPC */ IoInitializeDpcRequest(gControllerInfo[i].DriveInfo[j].DeviceObject, (PIO_DPC_ROUTINE)DpcForIsr); - /* 3f: Point the device extension at our DriveInfo struct */ + /* 3g: Point the device extension at our DriveInfo struct */ gControllerInfo[i].DriveInfo[j].DeviceObject->DeviceExtension = &gControllerInfo[i].DriveInfo[j]; - /* 3g: neat comic strip */ + /* 3h: neat comic strip */ - /* 3h: set the initial media type to unknown */ + /* 3i: set the initial media type to unknown */ memset(&gControllerInfo[i].DriveInfo[j].DiskGeometry, 0, sizeof(DISK_GEOMETRY)); gControllerInfo[i].DriveInfo[j].DiskGeometry.MediaType = Unknown; - /* 3i: Now that we're done, set the Initialized flag so we know to free this in Unload */ + /* 3j: Now that we're done, set the Initialized flag so we know to free this in Unload */ gControllerInfo[i].DriveInfo[j].Initialized = TRUE; - /* 3j: Clear the DO_DEVICE_INITIALIZING flag */ + /* 3k: Clear the DO_DEVICE_INITIALIZING flag */ gControllerInfo[i].DriveInfo[j].DeviceObject->Flags &= ~DO_DEVICE_INITIALIZING; } }