]> xenbits.xensource.com Git - libvirt.git/commitdiff
vbox: Silently ignore missing registry key on Windows
authorMatthias Bolte <matthias.bolte@googlemail.com>
Mon, 10 Jan 2011 14:05:45 +0000 (15:05 +0100)
committerMatthias Bolte <matthias.bolte@googlemail.com>
Tue, 11 Jan 2011 19:56:25 +0000 (20:56 +0100)
Don't report an error when the VirtualBox registry key is missing,
as this just indicates that VirtualBox is not installed in general.

This matches the behavior of the XPCOM glue that silently ignores
a missing VBoxXPCOMC.so.

src/vbox/vbox_MSCOMGlue.c

index e6a886f7aa2a3028450a7242a2db6401a98296cd..e31a76328f67f0ccacb22d8c364067803f316835 100644 (file)
@@ -356,8 +356,9 @@ vboxLookupVersionInRegistry(void)
         status = RegOpenKeyEx(HKEY_LOCAL_MACHINE, keyName, 0, KEY_READ, &key);
 
         if (status != ERROR_SUCCESS) {
-            VIR_ERROR(_("Could not open registry key '%s' nor '%s'"),
-                      VBOX_REGKEY_ORACLE, VBOX_REGKEY_SUN);
+            /* Both keys aren't there, or we cannot open them. In general this
+             * indicates that VirtualBox is not installed, so we just silently
+             * fail here making vboxRegister() register the dummy driver. */
             return -1;
         }
     }