[PATCH] vbox: don't register NULL driver

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

 



We were missing check for the fact that the storage driver was found and
in case there is no vbox storage driver available, daemon raised the
following error each start:

  error : virRegisterStorageDriver:592 : driver in
  virRegisterStorageDriver must not be NULL

Fixing this makes the condition unified with networkDriver registration
in vbox as well.

Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---
 src/vbox/vbox_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/vbox/vbox_driver.c b/src/vbox/vbox_driver.c
index c64d2d6..b2e35e9 100644
--- a/src/vbox/vbox_driver.c
+++ b/src/vbox/vbox_driver.c
@@ -74,7 +74,7 @@ int vboxStorageRegister(void)
     if (VBoxCGlueInit(&uVersion) == 0)
         storageDriver = vboxGetStorageDriver(uVersion);

-    if (virRegisterStorageDriver(storageDriver) < 0)
+    if (storageDriver && virRegisterStorageDriver(storageDriver) < 0)
         return -1;
     return 0;
 }
-- 
2.1.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]