win-pvdrivers

changeset 273:63920d09b07d wdm

Fixed stupid bug. shutdownmon is now working
author James Harper <james.harper@bendigoit.com.au>
date Sat May 17 00:06:05 2008 +1000 (2008-05-17)
parents 909b775a891f
children 874c3640830e
files ShutdownMon/Program.cs xenpci/xenpci_fdo.c
line diff
     1.1 --- a/ShutdownMon/Program.cs	Fri May 16 23:56:57 2008 +1000
     1.2 +++ b/ShutdownMon/Program.cs	Sat May 17 00:06:05 2008 +1000
     1.3 @@ -328,7 +328,7 @@ namespace ShutdownMon
     1.4              handle = CreateFile(GetXenInterfacePath(), FILE_GENERIC_READ, 0, IntPtr.Zero, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, IntPtr.Zero);
     1.5              FileStream fs = new FileStream(handle, FileAccess.Read);
     1.6              StreamReader sr = new StreamReader(fs);
     1.7 -
     1.8 +            Console.WriteLine("Opened");
     1.9              while (true)
    1.10              {
    1.11                  string command = sr.ReadLine();
     2.1 --- a/xenpci/xenpci_fdo.c	Fri May 16 23:56:57 2008 +1000
     2.2 +++ b/xenpci/xenpci_fdo.c	Sat May 17 00:06:05 2008 +1000
     2.3 @@ -244,7 +244,7 @@ XenPci_ProcessShutdownIrp(PXENPCI_DEVICE
     2.4      KdPrint((__DRIVER_NAME "     length = %d\n", length));
     2.5      if (length > 0)
     2.6      {
     2.7 -      memcpy(irp->AssociatedIrp.SystemBuffer, &xpdd->shutdown_ring[xpdd->shutdown_prod & (SHUTDOWN_RING_SIZE - 1)], length);
     2.8 +      memcpy(irp->AssociatedIrp.SystemBuffer, &xpdd->shutdown_ring[xpdd->shutdown_cons & (SHUTDOWN_RING_SIZE - 1)], length);
     2.9        xpdd->shutdown_cons += length;
    2.10        if (xpdd->shutdown_cons > SHUTDOWN_RING_SIZE)
    2.11        {