[libvirt] [PATCH] Catch dnsmasq start failures

Guido Günther agx at sigxcpu.org
Sat Jul 23 21:26:15 UTC 2011


While we checked the return value we didn't maks sure ret != 0 which
resulted in dnsmasq errors being ignored.
---
 src/network/bridge_driver.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 554a8ac..4882753 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -731,8 +731,10 @@ networkStartDhcpDaemon(virNetworkObjPtr network)
     if (ret < 0)
         goto cleanup;
 
-    if (virCommandRun(cmd, NULL) < 0)
+    ret = virCommandRun(cmd, NULL);
+    if (ret < 0) {
         goto cleanup;
+    }
 
     /*
      * There really is no race here - when dnsmasq daemonizes, its
-- 
1.7.5.4




More information about the libvir-list mailing list