[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[win-pv-devel] [PATCH] Ignore unused devices when checking for compatability



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@xxxxxxxxxx>
---
 src/coinst/coinst.c | 22 +++++++++-------------
 1 file changed, 9 insertions(+), 13 deletions(-)

diff --git a/src/coinst/coinst.c b/src/coinst/coinst.c
index c1c5f17..8182d59 100644
--- a/src/coinst/coinst.c
+++ b/src/coinst/coinst.c
@@ -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:
-- 
2.16.2.windows.1


_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/win-pv-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.