Author: hpoussin
Date: Sat Aug 23 04:43:56 2008
New Revision: 35554
URL:
http://svn.reactos.org/svn/reactos?rev=35554&view=rev
Log:
Add new devices at start of list, not end. Order is now like in pre-r35543
Modified:
trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c
Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.…
==============================================================================
--- trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] Sat Aug 23 04:43:56 2008
@@ -388,11 +388,10 @@
{
KeAcquireSpinLock(&IopDeviceTreeLock, &OldIrql);
Node->Parent = ParentNode;
- if (ParentNode->LastChild != NULL)
- ParentNode->LastChild->Sibling = Node;
- else
- ParentNode->Child = Node;
- ParentNode->LastChild = Node;
+ Node->Sibling = ParentNode->Child;
+ ParentNode->Child = Node;
+ if (ParentNode->LastChild == NULL)
+ ParentNode->LastChild = Node;
KeReleaseSpinLock(&IopDeviceTreeLock, OldIrql);
Node->Level = ParentNode->Level + 1;
}