[libvirt] [PATCH] 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. --- src/vbox/vbox_MSCOMGlue.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/src/vbox/vbox_MSCOMGlue.c b/src/vbox/vbox_MSCOMGlue.c index e6a886f..be0ec34 100644 --- a/src/vbox/vbox_MSCOMGlue.c +++ b/src/vbox/vbox_MSCOMGlue.c @@ -356,8 +356,6 @@ 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); return -1; } } -- 1.7.0.4

On 01/10/2011 07:09 AM, Matthias Bolte wrote:
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 | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/src/vbox/vbox_MSCOMGlue.c b/src/vbox/vbox_MSCOMGlue.c index e6a886f..be0ec34 100644 --- a/src/vbox/vbox_MSCOMGlue.c +++ b/src/vbox/vbox_MSCOMGlue.c @@ -356,8 +356,6 @@ 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);
Maybe worth a comment in the code (rather than just the commit message), but that's a minor nit. ACK. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

2011/1/10 Eric Blake <eblake@redhat.com>:
On 01/10/2011 07:09 AM, Matthias Bolte wrote:
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 | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/src/vbox/vbox_MSCOMGlue.c b/src/vbox/vbox_MSCOMGlue.c index e6a886f..be0ec34 100644 --- a/src/vbox/vbox_MSCOMGlue.c +++ b/src/vbox/vbox_MSCOMGlue.c @@ -356,8 +356,6 @@ 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);
Maybe worth a comment in the code (rather than just the commit message), but that's a minor nit.
ACK.
I added a comment and pushed the result. Matthias

On 11/01/2011, at 1:09 AM, Matthias Bolte wrote:
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 | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/src/vbox/vbox_MSCOMGlue.c b/src/vbox/vbox_MSCOMGlue.c index e6a886f..be0ec34 100644 --- a/src/vbox/vbox_MSCOMGlue.c +++ b/src/vbox/vbox_MSCOMGlue.c @@ -356,8 +356,6 @@ 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); return -1; } }
Tested this on a new build of the installer, and the error message no longer appears. :)
participants (3)
-
Eric Blake
-
Justin Clift
-
Matthias Bolte