Author: hpoussin
Date: Wed Oct 3 17:48:51 2007
New Revision: 29375
URL:
http://svn.reactos.org/svn/reactos?rev=29375&view=rev
Log:
Implement NdisMWriteLogData, enough to see something
Modified:
trunk/reactos/drivers/network/ndis/ndis/miniport.c
Modified: trunk/reactos/drivers/network/ndis/ndis/miniport.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
==============================================================================
--- trunk/reactos/drivers/network/ndis/ndis/miniport.c (original)
+++ trunk/reactos/drivers/network/ndis/ndis/miniport.c Wed Oct 3 17:48:51 2007
@@ -2048,9 +2048,36 @@
IN PVOID LogBuffer,
IN UINT LogBufferSize)
{
- UNIMPLEMENTED
-
- return NDIS_STATUS_FAILURE;
+ PUCHAR Buffer = LogBuffer;
+ UINT i, j, idx;
+
+ UNIMPLEMENTED;
+ for (i = 0; i < LogBufferSize; i += 16)
+ {
+ DbgPrint("%08x |", i);
+ for (j = 0; j < 16; j++)
+ {
+ idx = i + j;
+ if (idx < LogBufferSize)
+ DbgPrint(" %02x", Buffer[idx]);
+ else
+ DbgPrint(" ");
+ }
+ DbgPrint(" | ");
+ for (j = 0; j < 16; j++)
+ {
+ idx = i + j;
+ if (idx == LogBufferSize)
+ break;
+ if (Buffer[idx] >= ' ') /* FIXME: not portable! replace by if
(isprint(Buffer[idx])) ? */
+ DbgPrint("%c", Buffer[idx]);
+ else
+ DbgPrint(".");
+ }
+ DbgPrint("\n");
+ }
+
+ return NDIS_STATUS_FAILURE;
}