[ros-diffs] [janderwald] 41991: - Dont try allocate a error log packet as IoAllocateErrorLogEntry appears to be broken

janderwald at svn.reactos.org janderwald at svn.reactos.org
Thu Jul 16 16:42:43 CEST 2009


Author: janderwald
Date: Thu Jul 16 16:42:43 2009
New Revision: 41991

URL: http://svn.reactos.org/svn/reactos?rev=41991&view=rev
Log:
- Dont try allocate a error log packet as IoAllocateErrorLogEntry appears to be broken

Modified:
    trunk/reactos/drivers/wdm/audio/backpln/portcls/irp.c

Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/irp.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/portcls/irp.c?rev=41991&r1=41990&r2=41991&view=diff
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/irp.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/irp.c [iso-8859-1] Thu Jul 16 16:42:43 2009
@@ -43,9 +43,6 @@
     PPCLASS_DEVICE_EXTENSION DeviceExt;
     PIO_STACK_LOCATION IoStack;
     IResourceList* resource_list = NULL;
-    ULONG Length;
-    WCHAR szMsg[100];
-    PIO_ERROR_LOG_PACKET EventEntry;
 
     DPRINT("PortClsPnp called\n");
 
@@ -100,22 +97,6 @@
             if (!NT_SUCCESS(Status))
             {
                 DPRINT("StartDevice returned a failure code [0x%8x]\n", Status);
-                swprintf(szMsg, L"%%1 failed to start with %x", Status);
-                Length = (wcslen(szMsg) + 1) * sizeof(WCHAR) + sizeof(IO_ERROR_LOG_PACKET);
-                if (Length < ERROR_LOG_MAXIMUM_SIZE)
-                {
-                    EventEntry = (PIO_ERROR_LOG_PACKET)IoAllocateErrorLogEntry(DeviceExt->PhysicalDeviceObject, Length);
-                    if (EventEntry)
-                    {
-                        RtlZeroMemory(EventEntry, Length);
-                        EventEntry->MajorFunctionCode = IRP_MJ_PNP;
-                        EventEntry->NumberOfStrings = 1;
-                        EventEntry->StringOffset = sizeof(IO_ERROR_LOG_PACKET);
-                        EventEntry->ErrorCode = Status;
-                        wcscpy((LPWSTR)(EventEntry + 1), szMsg);
-                        IoWriteErrorLogEntry(EventEntry);
-                    }
-                }
                 Irp->IoStatus.Status = Status;
                 IoCompleteRequest(Irp, IO_NO_INCREMENT);
                 return Status;



More information about the Ros-diffs mailing list