OpenVZ: Fix some overwritten error codes

Don't overwrite errors during domain creation/definition to ease
tracking down problems.
This commit is contained in:
Guido Günther 2010-11-29 10:23:15 +01:00
parent 50a7c59bb3
commit 2d626c7d08

View File

@ -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;
}