[ros-diffs] [hpoussin] 25734: Correctly fix the hack introduced in r25667.

hpoussin at svn.reactos.org hpoussin at svn.reactos.org
Tue Feb 6 00:58:07 CET 2007


Author: hpoussin
Date: Tue Feb  6 02:58:06 2007
New Revision: 25734

URL: http://svn.reactos.org/svn/reactos?rev=25734&view=rev
Log:
Correctly fix the hack introduced in r25667.

Modified:
    trunk/reactos/ntoskrnl/ex/init.c
    trunk/reactos/ntoskrnl/io/iomgr/driver.c

Modified: trunk/reactos/ntoskrnl/ex/init.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/init.c?rev=25734&r1=25733&r2=25734&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/ex/init.c (original)
+++ trunk/reactos/ntoskrnl/ex/init.c Tue Feb  6 02:58:06 2007
@@ -1186,10 +1186,7 @@
     InbvUpdateProgressBar(85);
 
     /* Make sure nobody touches the loader block again */
-    /* FIXME: IopLoadServiceModule() touches KeLoaderBlock->LoadOrderListHead,
-       and that happens past this point too. So either copy that list to the
-       Io's allocated space, or properly fix Io. */
-    //if (LoaderBlock == KeLoaderBlock) KeLoaderBlock = NULL;
+    if (LoaderBlock == KeLoaderBlock) KeLoaderBlock = NULL;
     LoaderBlock = Context = NULL;
 
     /* Update progress bar */

Modified: trunk/reactos/ntoskrnl/io/iomgr/driver.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/driver.c?rev=25734&r1=25733&r2=25734&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/driver.c (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/driver.c Tue Feb  6 02:58:06 2007
@@ -443,18 +443,28 @@
 
    if (*ModuleObject == NULL)
    {
-      Status = STATUS_UNSUCCESSFUL;
+      /*
+       * Case for disabled drivers
+       */
+
+      if (ServiceStart >= 4)
+      {
+         /* FIXME: Check if it is the right status code */
+         Status = STATUS_PLUGPLAY_NO_DEVICE;
+      }
 
       /*
        * Special case for boot modules that were loaded by boot loader.
        */
 
-      if (ServiceStart == 0)
+      else if (KeLoaderBlock)
       {
          WCHAR SearchNameBuffer[256];
          UNICODE_STRING SearchName;
          PLIST_ENTRY ListHead, NextEntry;
          PLDR_DATA_TABLE_ENTRY LdrEntry;
+
+         Status = STATUS_UNSUCCESSFUL;
 
          /*
           * FIXME:
@@ -499,10 +509,10 @@
       }
 
       /*
-       * Case for rest of the drivers (except disabled)
+       * Case for rest of the drivers
        */
 
-      else if (ServiceStart < 4)
+      else
       {
          DPRINT("Loading module\n");
          Status = LdrLoadModule(&ServiceImagePath, ModuleObject);




More information about the Ros-diffs mailing list