[PATCH] openvz: Fixe some overwritten error codes

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

 



Hi,
this patch fixes some overwritten error messages. There are more but
these are the ones I could check easily. O.k. to apply?
Cheers,
 -- Guido
>From c18eb1fee9248bc8f09cb937416d43fa30d5c7b8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@xxxxxxxxxxx>
Date: Mon, 29 Nov 2010 10:23:15 +0100
Subject: [PATCH] OpenVZ: Fix some overwritten error codes

Don't overwrite errors during domain creation/definition to ease
tracking down problems.
---
 src/openvz/openvz_driver.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
index 6189fc1..cbc2888 100644
--- a/src/openvz/openvz_driver.c
+++ b/src/openvz/openvz_driver.c
@@ -59,6 +59,7 @@
 #include "bridge.h"
 #include "files.h"
 #include "intprops.h"
+#include "logging.h"
 
 #define VIR_FROM_THIS VIR_FROM_OPENVZ
 
@@ -211,8 +212,7 @@ static int openvzSetInitialConfig(virDomainDefPtr vmdef)
     else
     {
         if (openvzDomainDefineCmd(prog, OPENVZ_MAX_ARG, vmdef) < 0) {
-            openvzError(VIR_ERR_INTERNAL_ERROR, "%s",
-                        _("Error creating command for container"));
+            VIR_ERROR0(_("Error creating command for container"));
             goto cleanup;
         }
 
@@ -879,8 +879,7 @@ openvzDomainDefineXML(virConnectPtr conn, const char *xml)
     vm->persistent = 1;
 
     if (openvzSetInitialConfig(vm->def) < 0) {
-        openvzError(VIR_ERR_INTERNAL_ERROR, "%s",
-                    _("Error creating initial configuration"));
+        VIR_ERROR0(_("Error creating initial configuration"));
         goto cleanup;
     }
 
@@ -968,8 +967,7 @@ openvzDomainCreateXML(virConnectPtr conn, const char *xml,
     vm->persistent = 1;
 
     if (openvzSetInitialConfig(vm->def) < 0) {
-        openvzError(VIR_ERR_INTERNAL_ERROR, "%s",
-                    _("Error creating initial configuration"));
+        VIR_ERROR0(_("Error creating initial configuration"));
         goto cleanup;
     }
 
-- 
1.7.2.3

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