win-pvdrivers

diff xenenum/xenenum.c @ 77:b9b4b731f890

Tidyups and work on getting xennet at least as functional as it was before I started messing with it :)
author James Harper <james.harper@bendigoit.com.au>
date Fri Dec 28 23:21:49 2007 +1100 (2007-12-28)
parents dfa772949c6e
children 17319a4920eb
line diff
     1.1 --- a/xenenum/xenenum.c	Thu Dec 27 22:23:33 2007 +1100
     1.2 +++ b/xenenum/xenenum.c	Fri Dec 28 23:21:49 2007 +1100
     1.3 @@ -433,7 +433,10 @@ XenEnum_WatchHandler(char *Path, PVOID D
     1.4      RtlInitAnsiString(&AnsiBuf, Bits[1]);
     1.5      RtlAnsiStringToUnicodeString(&IdentificationDescription.DeviceType, &AnsiBuf, TRUE);
     1.6      IdentificationDescription.DeviceIndex = atoi(Bits[2]);
     1.7 -    Status = WdfChildListAddOrUpdateChildDescriptionAsPresent(ChildList, &IdentificationDescription.Header, NULL);
     1.8 +    if (IdentificationDescription.DeviceIndex > 0)
     1.9 +    {
    1.10 +      Status = WdfChildListAddOrUpdateChildDescriptionAsPresent(ChildList, &IdentificationDescription.Header, NULL);
    1.11 +    }
    1.12    }
    1.13    else if (Count > 3)
    1.14    {
    1.15 @@ -534,6 +537,7 @@ XenEnum_ChildListCreateDevice(WDFCHILDLI
    1.16    ChildDeviceData->XenInterface.InterfaceHeader.InterfaceDereference = WdfDeviceInterfaceDereferenceNoOp;
    1.17  
    1.18    ChildDeviceData->XenInterface.AllocMMIO = XenInterface.AllocMMIO;
    1.19 +  ChildDeviceData->XenInterface.FreeMem = XenInterface.FreeMem;
    1.20  
    1.21    ChildDeviceData->XenInterface.EvtChn_Bind = XenInterface.EvtChn_Bind;
    1.22    ChildDeviceData->XenInterface.EvtChn_Unbind = XenInterface.EvtChn_Unbind;