From 2d626c7d08b0b815155b93065d466ba89dfb82f7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Guido=20G=C3=BCnther?= 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 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c index 8dc95e2eb4..b84a56adc2 100644 --- a/src/openvz/openvz_driver.c +++ b/src/openvz/openvz_driver.c @@ -58,6 +58,7 @@ #include "memory.h" #include "bridge.h" #include "files.h" +#include "logging.h" #define VIR_FROM_THIS VIR_FROM_OPENVZ @@ -210,8 +211,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; } @@ -878,8 +878,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; } @@ -967,8 +966,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; } -- 2.47.2