[bus,probe] Change when boot disks are probed
authorShao Miller <Shao.Miller@yrdsb.edu.on.ca>
Thu, 6 Jan 2011 04:43:46 +0000 (23:43 -0500)
committerShao Miller <Shao.Miller@yrdsb.edu.on.ca>
Thu, 6 Jan 2011 04:43:46 +0000 (23:43 -0500)
Now they will be probed for at every bus FDO->PDO
attach operation; could be multiple times in one
session.

src/winvblock/bus.c
src/winvblock/probe.c

index 510f442..993a22d 100644 (file)
@@ -175,6 +175,9 @@ static VOID STDCALL WvBusAttach_(IN OUT WVL_SP_THREAD_ITEM item) {
     WvBus.Pdo = bus_attach->pdo;
     WvBus.LowerDeviceObject = lower;
     DBG("Attached.\n");
+    /* Probe for disks. */
+    WvProbeDisks();
+    WvlBusProcessWorkItems(&WvBus);
     bus_attach->status = STATUS_SUCCESS;
     KeSetEvent(&bus_attach->signal, 0, FALSE);
     return;
@@ -613,11 +616,8 @@ static VOID STDCALL WvBusIrp_(IN OUT WVL_SP_THREAD_ITEM item) {
 
         case IRP_MJ_PNP:
           DBG(WVL_M_LIT " IRP_MJ_PNP.\n");
-          if (minor == IRP_MN_QUERY_DEVICE_RELATIONS)
-            WvProbeDisks();
-            WvlBusProcessWorkItems(&WvBus);
-            WvlBusPnpIrp(&WvBus, irp, io_stack_loc->MinorFunction);
-            break;
+          WvlBusPnpIrp(&WvBus, irp, io_stack_loc->MinorFunction);
+          break;
 
         case IRP_MJ_DEVICE_CONTROL:
           DBG(WVL_M_LIT " IRP_MJ_DEVICE_CONTROL.\n");
index 4495c9a..281f5f8 100644 (file)
@@ -69,12 +69,7 @@ WV_SP_PROBE_SAFE_MBR_HOOK STDCALL WvProbeGetSafeHook(
   }
 
 VOID WvProbeDisks(void) {
-    static BOOLEAN probed = FALSE;
-
-    if (probed)
-      return;
     WvMemdiskFind();
     ramdisk_grub4dos__find();
     filedisk_grub4dos__find();
-    probed = TRUE;
   }