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

[libvirt] [PATCH] set an error when the domain doesn't show up



Hi,
attached patch makes sure we set a proper error status when the domain
doesn't show up. O.k. to apply?
Cheers,
 -- Guido
>From f7a6fa53008ab17eab04d63a53a33bfd455bc596 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Guido=20G=C3=BCnther?= <agx sigxcpu org>
Date: Sat, 7 Feb 2009 17:14:26 +0100
Subject: [PATCH] fix return status when domain doesn't show up

---
 src/qemu_driver.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/qemu_driver.c b/src/qemu_driver.c
index 4bec482..47ca6c7 100644
--- a/src/qemu_driver.c
+++ b/src/qemu_driver.c
@@ -1218,8 +1218,11 @@ static int qemudStartVMDaemon(virConnectPtr conn,
                 usleep(100*1000);
                 retries--;
             }
-            if (ret)
-                qemudLog(QEMUD_WARN, _("Domain %s didn't show up\n"), vm->def->name);
+            if (ret) {
+                qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
+                                 _("Domain %s didn't show up\n"), vm->def->name);
+                ret = -1;
+            }
         } else {
             qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
                              "%s", _("Unable to daemonize QEMU process"));
-- 
1.6.0.6


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