win-pvdrivers

diff xenenum/xenenum.c @ 76:dfa772949c6e

Working on xennet
author James Harper <james.harper@bendigoit.com.au>
date Thu Dec 27 22:23:33 2007 +1100 (2007-12-27)
parents b7863ede7a37
children b9b4b731f890
line diff
     1.1 --- a/xenenum/xenenum.c	Thu Dec 27 20:49:42 2007 +1100
     1.2 +++ b/xenenum/xenenum.c	Thu Dec 27 22:23:33 2007 +1100
     1.3 @@ -297,7 +297,7 @@ XenEnum_D0EntryPostInterruptsEnabled(WDF
     1.4  
     1.5    PdoDeviceData = (PXENPCI_XEN_DEVICE_DATA)Pdo->DeviceExtension; //GetXenDeviceData(Device);
     1.6  
     1.7 -  //KdPrint((__DRIVER_NAME "     BasePath = %s\n", PdoDeviceData->BasePath));
     1.8 +  //KdPrint((__DRIVER_NAME "     Path = %s\n", PdoDeviceData->Path));
     1.9    PdoDeviceData->WatchHandler = XenEnum_WatchHandler;
    1.10    PdoDeviceData->WatchContext = Device;
    1.11  
    1.12 @@ -308,14 +308,14 @@ XenEnum_D0EntryPostInterruptsEnabled(WDF
    1.13    if (AutoEnumerate)
    1.14    {
    1.15      // TODO: Get the correct path from parent here...
    1.16 -    msg = XenInterface.XenBus_List(XenInterface.InterfaceHeader.Context, XBT_NIL, PdoDeviceData->BasePath, &Devices);
    1.17 +    msg = XenInterface.XenBus_List(XenInterface.InterfaceHeader.Context, XBT_NIL, PdoDeviceData->Path, &Devices);
    1.18      if (!msg)
    1.19      {
    1.20        for (i = 0; Devices[i]; i++)
    1.21        {
    1.22          KdPrint((__DRIVER_NAME "     found existing device %s\n", Devices[i]));
    1.23 -        KdPrint((__DRIVER_NAME "     faking watch event for %s/%s", PdoDeviceData->BasePath, Devices[i]));
    1.24 -        RtlStringCbPrintfA(buffer, ARRAY_SIZE(buffer), "%s/%s", PdoDeviceData->BasePath, Devices[i]);
    1.25 +        KdPrint((__DRIVER_NAME "     faking watch event for %s/%s", PdoDeviceData->Path, Devices[i]));
    1.26 +        RtlStringCbPrintfA(buffer, ARRAY_SIZE(buffer), "%s/%s", PdoDeviceData->Path, Devices[i]);
    1.27          XenEnum_WatchHandler(buffer, Device);
    1.28          //ExFreePoolWithTag(Devices[i], XENPCI_POOL_TAG);
    1.29        }
    1.30 @@ -448,15 +448,15 @@ XenEnum_WatchHandler(char *Path, PVOID D
    1.31          KdPrint((__FUNCTION__ " No child device data, should never happen\n"));
    1.32          continue;
    1.33        }
    1.34 -      if (strncmp(ChildDeviceData->BasePath, Path, strlen(ChildDeviceData->BasePath)) == 0 && Path[strlen(ChildDeviceData->BasePath)] == '/')
    1.35 +      if (strncmp(ChildDeviceData->Path, Path, strlen(ChildDeviceData->Path)) == 0 && Path[strlen(ChildDeviceData->Path)] == '/')
    1.36        {
    1.37 -        KdPrint((__DRIVER_NAME "     Child Path = %s (Match - WatchHandler = %08x)\n", ChildDeviceData->BasePath, ChildDeviceData->WatchHandler));
    1.38 +        KdPrint((__DRIVER_NAME "     Child Path = %s (Match - WatchHandler = %08x)\n", ChildDeviceData->Path, ChildDeviceData->WatchHandler));
    1.39          if (ChildDeviceData->WatchHandler != NULL)
    1.40            ChildDeviceData->WatchHandler(Path, ChildDeviceData->WatchContext);
    1.41        }
    1.42        else
    1.43        {
    1.44 -        //KdPrint((__DRIVER_NAME "     Child Path = %s (No Match)\n", ChildDeviceData->BasePath));
    1.45 +        //KdPrint((__DRIVER_NAME "     Child Path = %s (No Match)\n", ChildDeviceData->Path));
    1.46        }
    1.47      }
    1.48      WdfChildListEndIteration(ChildList, &ChildIterator);
    1.49 @@ -523,7 +523,7 @@ XenEnum_ChildListCreateDevice(WDFCHILDLI
    1.50    ChildDeviceData->Magic = XEN_DATA_MAGIC;
    1.51    ChildDeviceData->AutoEnumerate = AutoEnumerate;
    1.52    ChildDeviceData->WatchHandler = NULL;
    1.53 -  strncpy(ChildDeviceData->BasePath, XenIdentificationDesc->Path, 128);
    1.54 +  strncpy(ChildDeviceData->Path, XenIdentificationDesc->Path, 128);
    1.55  //  memcpy(&ChildDeviceData->InterruptRaw, &InterruptRaw, sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR));
    1.56  //  memcpy(&ChildDeviceData->InterruptTranslated, &InterruptTranslated, sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR));
    1.57