[Wine-devel] [3/6] wineusbhub: Simplify __wine_usbhub_dispatch_pnp.

Alexander Morozov =?iso-8859-1?q?amorozov_=CE=C1_etersoft=2Eru?=
Пт Окт 3 20:01:14 MSD 2008


Обработчик IRP_MN_QUERY_CAPABILITIES здесь всегда возвращает одно и то же, 
возвращаемые значения справедливы только для одного частного случая. Думаю, 
сейчас всё это можно убрать, так как для работы ключей это не необходимо.
----------- следующая часть -----------
From 014ff7d3f31f6f25214a7849cd05b745fe83bc8f Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov на etersoft.ru>
Date: Fri, 3 Oct 2008 13:02:51 +0400
Subject: [PATCH] wineusbhub: Simplify __wine_usbhub_dispatch_pnp.

---
 dlls/wineusbhub/wineusbhub.c |   60 +----------------------------------------
 1 files changed, 2 insertions(+), 58 deletions(-)

diff --git a/dlls/wineusbhub/wineusbhub.c b/dlls/wineusbhub/wineusbhub.c
index 8159639..a7985cf 100644
--- a/dlls/wineusbhub/wineusbhub.c
+++ b/dlls/wineusbhub/wineusbhub.c
@@ -234,69 +234,13 @@ NTSTATUS WINAPI __wine_usbhub_internal_ioctl( DEVICE_OBJECT *device, IRP *irp )
 
 NTSTATUS WINAPI __wine_usbhub_dispatch_pnp( DEVICE_OBJECT *device, IRP *irp )
 {
-    IO_STACK_LOCATION *irpsp = irp->Tail.Overlay.s.u.CurrentStackLocation;
-    NTSTATUS status = STATUS_UNSUCCESSFUL;
-
     TRACE( "%p, %p\n", device, irp );
 
-    switch (irpsp->MinorFunction)
-    {
-    case IRP_MN_START_DEVICE:
-        status = STATUS_SUCCESS;
-        break;
-    case IRP_MN_QUERY_DEVICE_RELATIONS:
-        FIXME( "IRP_MN_QUERY_DEVICE_RELATIONS\n" );
-        status = STATUS_SUCCESS;
-        break;
-    case IRP_MN_QUERY_CAPABILITIES:
-        FIXME( "IRP_MN_QUERY_CAPABILITIES\n" );
-        {
-            PDEVICE_CAPABILITIES devCapab = irpsp->Parameters.DeviceCapabilities.Capabilities;
-
-            if (devCapab != NULL)
-            {
-                devCapab->Removable = 1;
-                devCapab->Address = 1;
-                devCapab->UINumber = 0;
-                devCapab->DeviceState[PowerSystemUnspecified] = PowerDeviceUnspecified;
-                devCapab->DeviceState[PowerSystemWorking] = PowerDeviceD0;
-                devCapab->DeviceState[PowerSystemSleeping1] = PowerDeviceD3;
-                devCapab->DeviceState[PowerSystemSleeping2] = PowerDeviceD3;
-                devCapab->DeviceState[PowerSystemSleeping3] = PowerDeviceD3;
-                devCapab->DeviceState[PowerSystemHibernate] = PowerDeviceD3;
-                devCapab->DeviceState[PowerSystemShutdown] = PowerDeviceD3;
-                devCapab->DeviceState[PowerSystemMaximum] = PowerDeviceD1;
-                devCapab->SystemWake = PowerSystemSleeping1;
-                devCapab->DeviceWake = PowerDeviceD0;
-                status = STATUS_SUCCESS;
-            }
-        }
-        break;
-    case IRP_MN_QUERY_RESOURCE_REQUIREMENTS:
-        FIXME( "IRP_MN_QUERY_RESOURCE_REQUIREMENTS\n" );
-        status = STATUS_SUCCESS;
-        break;
-    case IRP_MN_FILTER_RESOURCE_REQUIREMENTS:
-        FIXME( "IRP_MN_FILTER_RESOURCE_REQUIREMENTS\n" );
-        status = STATUS_SUCCESS;
-        break;
-    case IRP_MN_QUERY_PNP_DEVICE_STATE:
-        FIXME( "IRP_MN_QUERY_PNP_DEVICE_STATE\n" );
-        status = STATUS_SUCCESS;
-        break;
-    case IRP_MN_QUERY_LEGACY_BUS_INFORMATION:
-        FIXME( "IRP_MN_QUERY_LEGACY_BUS_INFORMATION\n" );
-        status = STATUS_SUCCESS;
-        break;
-    default:
-        FIXME( "unsupported MinorFunction %x\n", irpsp->MinorFunction );
-    }
-
-    irp->IoStatus.u.Status = status;
+    irp->IoStatus.u.Status = STATUS_SUCCESS;
     irp->IoStatus.Information = 0;
     __wine_IofCompleteRequest( irp, IO_NO_INCREMENT );
 
-    return status;
+    return STATUS_SUCCESS;
 }
 #endif
 
-- 
1.5.6.5.GIT



Подробная информация о списке рассылки Wine-devel