[KMTESTS:PO]
[reactos.git] / rostests / kmtests / kmtest_drv / kmtest_standalone.c
index cf4ced3..c6ad096 100644 (file)
@@ -121,7 +121,8 @@ DriverEntry(
         RtlAppendUnicodeToString(&DeviceName, DeviceNameSuffix);
         Status = IoCreateDevice(DriverObject, 0, &DeviceName,
                                 FILE_DEVICE_UNKNOWN,
-                                FILE_DEVICE_SECURE_OPEN | FILE_READ_ONLY_DEVICE,
+                                FILE_DEVICE_SECURE_OPEN |
+                                    (Flags & TESTENTRY_NO_READONLY_DEVICE ? 0 : FILE_READ_ONLY_DEVICE),
                                 Flags & TESTENTRY_NO_EXCLUSIVE_DEVICE ? FALSE : TRUE,
                                 &TestDeviceObject);
 
@@ -131,6 +132,9 @@ DriverEntry(
             goto cleanup;
         }
 
+        if (Flags & TESTENTRY_BUFFERED_IO_DEVICE)
+            TestDeviceObject->Flags |= DO_BUFFERED_IO;
+
         DPRINT("DriverEntry. Created DeviceObject %p\n",
                  TestDeviceObject);
     }
@@ -306,8 +310,6 @@ DriverDispatch(
     PIO_STACK_LOCATION IoStackLocation;
     int i;
 
-    PAGED_CODE();
-
     IoStackLocation = IoGetCurrentIrpStackLocation(Irp);
 
     DPRINT("DriverDispatch: Function=%s, Device=%p\n",