[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [win-pv-devel] [PATCH] Add missing parameterization of vendor device
The vendor device check in XENFILT was incorrectly hard-coded to C000 rather than the prevailing vendor device id set at build time. Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx> --- src/xenfilt/pvdevice.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/xenfilt/pvdevice.c b/src/xenfilt/pvdevice.c index 04d8193..179dc3d 100644 --- a/src/xenfilt/pvdevice.c +++ b/src/xenfilt/pvdevice.c @@ -72,6 +72,7 @@ __PvdeviceFree( static const CHAR *PvdeviceLegacyPrefix[] = { "PCI\\VEN_5853&DEV_0001", "PCI\\VEN_5853&DEV_0002", + NULL }; static BOOLEAN @@ -84,7 +85,7 @@ PvdeviceIsLegacy( UNREFERENCED_PARAMETER(Context); - for (Index = 0; Index < ARRAYSIZE(PvdeviceLegacyPrefix); Index++) { + for (Index = 0; PvdeviceLegacyPrefix[Index] != NULL; Index++) { const CHAR *Prefix = PvdeviceLegacyPrefix[Index]; if (_strnicmp(DeviceID, Prefix, strlen(Prefix)) == 0) @@ -95,7 +96,10 @@ PvdeviceIsLegacy( } static const CHAR *PvdeviceVendorDeviceID[] = { - "PCI\\VEN_5853&DEV_C000&SUBSYS_C0005853&REV_01", // XenServer +#ifdef VENDOR_DEVICE_ID_STR + "PCI\\VEN_5853&DEV_" VENDOR_DEVICE_ID_STR "&SUBSYS_C0005853&REV_01", +#endif + NULL }; static BOOLEAN @@ -105,7 +109,7 @@ PvdeviceIsVendorPresent( { ULONG Index; - for (Index = 0; Index < ARRAYSIZE(PvdeviceVendorDeviceID); Index++) { + for (Index = 0; PvdeviceVendorDeviceID[Index] != NULL; Index++) { const CHAR *DeviceID = PvdeviceVendorDeviceID[Index]; if (XENFILT_EMULATED(IsDevicePresent, -- 2.1.1 _______________________________________________ win-pv-devel mailing list win-pv-devel@xxxxxxxxxxxxxxxxxxxx http://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |