Zebediah Figura : ntoskrnl: Remove the device from the root device list in IRP_MN_REMOVE_DEVICE.

Alexandre Julliard julliard at winehq.org
Wed Apr 14 16:01:19 CDT 2021


Module: wine
Branch: master
Commit: 5bf72a75e3b5bad6b5e744164ec78833eed09090
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=5bf72a75e3b5bad6b5e744164ec78833eed09090

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Wed Apr 14 09:39:57 2021 -0500

ntoskrnl: Remove the device from the root device list in IRP_MN_REMOVE_DEVICE.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntoskrnl.exe/pnp.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/dlls/ntoskrnl.exe/pnp.c b/dlls/ntoskrnl.exe/pnp.c
index 0d9d816e3c0..095344b1073 100644
--- a/dlls/ntoskrnl.exe/pnp.c
+++ b/dlls/ntoskrnl.exe/pnp.c
@@ -955,10 +955,13 @@ static NTSTATUS WINAPI pnp_manager_device_pnp( DEVICE_OBJECT *device, IRP *irp )
         break;
     case IRP_MN_START_DEVICE:
     case IRP_MN_SURPRISE_REMOVAL:
-    case IRP_MN_REMOVE_DEVICE:
         /* Nothing to do. */
         irp->IoStatus.u.Status = STATUS_SUCCESS;
         break;
+    case IRP_MN_REMOVE_DEVICE:
+        list_remove( &root_device->entry );
+        irp->IoStatus.u.Status = STATUS_SUCCESS;
+        break;
     case IRP_MN_QUERY_CAPABILITIES:
         irp->IoStatus.u.Status = STATUS_SUCCESS;
         break;




More information about the wine-cvs mailing list