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

[libvirt] [PATCH] Return a suitable error message if we can't find a matching emulator



Hi,
attached patch improves the error message when we can't find a suitable
emulator. Otherwise it's simply "Unknown failure". O.k. to apply?
Cheers,
 -- Guido
>From 7092e11363983228d005a45c054f9b3604771b10 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx sigxcpu org>
Date: Fri, 8 Oct 2010 14:16:46 +0200
Subject: [PATCH] Return a suitable error message if we can't find a matching emulator

---
 src/qemu/qemu_conf.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index 7a37c70..737b255 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -1519,8 +1519,11 @@ int qemudExtractVersion(struct qemud_driver *driver) {
     if ((binary = virCapabilitiesDefaultGuestEmulator(driver->caps,
                                                       "hvm",
                                                       ut.machine,
-                                                      "qemu")) == NULL)
+                                                      "qemu")) == NULL) {
+        qemuReportError(VIR_ERR_INTERNAL_ERROR,
+                        _("Cannot find suitable emulator for %s"), ut.machine);
         return -1;
+    }
 
     if (stat(binary, &sb) < 0) {
         virReportSystemError(errno,
-- 
1.7.1


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