[PATCH] If driver startup fails, dispatch virErrors

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

 



API users won't have any way to interact with the errors since this is
before a connection pointer is available, but the default error handler
at calls VIR_ERROR which gives us a better chance of seeing the issue.
---
 src/libvirt.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/libvirt.c b/src/libvirt.c
index 6a7a817..5f8b087 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -813,6 +813,7 @@ int virStateInitialize(bool privileged,
             if (virStateDriverTab[i]->initialize(privileged,
                                                  callback,
                                                  opaque) < 0) {
+                virDispatchError(NULL);
                 VIR_ERROR(_("Initialization of %s state driver failed"),
                           virStateDriverTab[i]->name);
                 return -1;
-- 
1.8.0.1

--
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]