Only if the major version part of the revision changes is it unsafe to
update the drivers without removing the unplug keys (thereby forcing a
fallback to emulated devices on the next reboot). Minor version changes
should be backwards compatible (within a reasonable time-frame).
Signed-off-by: Owen Smith <owen.smith@citrix.com>
Edited commit comment.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
unsigned int Revision;
int Count;
DWORD Index;
+ DWORD LatestRevision;
HRESULT Error;
DeviceID = strrchr(DeviceID, '&');
goto fail2;
found:
- // If we don't match the latest revision then it means the driver
- // binding will change.
- if (Index < ARRAYSIZE(DeviceRevision) - 1)
+ // If major part of the child device's revision does not match the major
+ // part of the latest revision then it means the driver binding will change.
+ LatestRevision = DeviceRevision[ARRAYSIZE(DeviceRevision) - 1];
+ if ((Revision & 0xFF000000) != (LatestRevision & 0xFF000000))
*NewBinding = TRUE;
Log("%x", Revision);