]> xenbits.xensource.com Git - pvdrivers/win/xenbus.git/commitdiff
Ignore unused devices when checking for compatability
authorOwen Smith <owen.smith@citrix.com>
Thu, 20 Dec 2018 17:23:14 +0000 (17:23 +0000)
committerPaul Durrant <paul.durrant@citrix.com>
Thu, 20 Dec 2018 17:23:14 +0000 (17:23 +0000)
When upgrading, the coinstaller checks specific ENUM keys for devices.
If there are dangling references to software keys, the coinstaller will
fail. Dangling references are often caused by registry cleaners or user
attempts to ensure old drivers are purged, but cannot be completely
successful, as the ENUM keys are protected.
Change this behaviour to ignore dangling references in the registry.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
src/coinst/coinst.c

index c1c5f17852bed3c1fd9c9b19360a93f64a8dc119..8182d59581c02105f0005522d3f6a8ac65d0efaa 100644 (file)
@@ -1213,27 +1213,29 @@ SupportChildDrivers(
             goto fail6;
 
         if (DriverKeyName == NULL)
-            goto loop;
+            goto loop1;
 
         Success = OpenDriverKey(DriverKeyName, &DriverKey);
         if (!Success)
-            goto fail7;
+            goto loop2;
 
         Success = GetMatchingDeviceID(DriverKey, &MatchingDeviceID);
         if (!Success)
-            goto fail8;
+            goto loop3;
 
         Success = SupportDeviceID(MatchingDeviceID, NewBinding);
         if (!Success)
-            goto fail9;
+            goto fail7;
 
         free(MatchingDeviceID);
 
+    loop3:
         RegCloseKey(DriverKey);
 
+    loop2:
         free(DriverKeyName);
 
-    loop:
+    loop1:
         RegCloseKey(DeviceKey);
     }
 
@@ -1246,19 +1248,13 @@ done:
 
     return TRUE;
 
-fail9:
-    Log("fail9");
+fail7:
+    Log("fail7");
 
     free(MatchingDeviceID);
 
-fail8:
-    Log("fail8");
-
     RegCloseKey(DriverKey);
 
-fail7:
-    Log("fail7");
-
     free(DriverKeyName);
 
 fail6: