Author: ros-arm-bringup
Date: Sun Jul 20 01:32:23 2008
New Revision: 34604
URL: 
http://svn.reactos.org/svn/reactos?rev=34604&view=rev
Log:
- Fix the parameters we were sending to IoCreateDevice for our drive FDO.
- Now the kernel attempts to mount us through CDFS!
- Start stubbing the work we'll need to do in RamdiskDeviceControl -- this is where
the emulation magic will happen.
Modified:
    trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c
Modified: trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/class/ramd…
==============================================================================
--- trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c [iso-8859-1] Sun Jul 20 01:32:23
2008
@@ -11,6 +11,7 @@
 #include <initguid.h>
 #include <ntddk.h>
 #include <ntdddisk.h>
+#include <ntddcdrm.h>
 #include <scsi.h>
 #include <ntddscsi.h>
 #include <mountdev.h>
@@ -371,8 +372,8 @@
         Status = IoCreateDevice(DeviceExtension->DeviceObject->DriverObject,
                                 sizeof(RAMDISK_DRIVE_EXTENSION),
                                 &DeviceName,
-                                FILE_DEVICE_DISK_FILE_SYSTEM, // FIXME: DISK
-                                FILE_READ_ONLY_DEVICE, // FIXME: Not always
+                                FILE_DEVICE_CD_ROM,
+                                0,
                                 0,
                                 &DeviceObject);
         if (!NT_SUCCESS(Status)) goto FailCreate;
@@ -906,9 +907,44 @@
     else
     {
         //
-        // Drive code not yet done
-        //
-        ASSERT(FALSE);
+        // Check what the request is
+        //
+        switch (IoStackLocation->Parameters.DeviceIoControl.IoControlCode)
+        {
+            case IOCTL_CDROM_CHECK_VERIFY:
+
+                UNIMPLEMENTED;
+                while (TRUE);
+                break;
+
+            case IOCTL_CDROM_GET_DRIVE_GEOMETRY:
+
+                UNIMPLEMENTED;
+                while (TRUE);
+                break;
+
+            case IOCTL_CDROM_READ_TOC:
+
+                UNIMPLEMENTED;
+                while (TRUE);
+                break;
+
+            default:
+
+                //
+                // Drive code not yet done
+                //
+                DPRINT1("IOCTL: %lx\n",
IoStackLocation->Parameters.DeviceIoControl.IoControlCode);
+                UNIMPLEMENTED;
+                while (TRUE);
+                break;
+        }
+
+        //
+        // Cleanup/complete
+        //
+        UNIMPLEMENTED;
+        while (TRUE);
     }
     //