mirror of https://gitee.com/openkylin/libvirt.git
vbox: Silently ignore missing registry key on Windows
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.
This commit is contained in:
parent
feddaf1dc8
commit
e4570729ee
|
@ -356,8 +356,9 @@ vboxLookupVersionInRegistry(void)
|
||||||
status = RegOpenKeyEx(HKEY_LOCAL_MACHINE, keyName, 0, KEY_READ, &key);
|
status = RegOpenKeyEx(HKEY_LOCAL_MACHINE, keyName, 0, KEY_READ, &key);
|
||||||
|
|
||||||
if (status != ERROR_SUCCESS) {
|
if (status != ERROR_SUCCESS) {
|
||||||
VIR_ERROR(_("Could not open registry key '%s' nor '%s'"),
|
/* Both keys aren't there, or we cannot open them. In general this
|
||||||
VBOX_REGKEY_ORACLE, VBOX_REGKEY_SUN);
|
* indicates that VirtualBox is not installed, so we just silently
|
||||||
|
* fail here making vboxRegister() register the dummy driver. */
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue